Skip to content

Instantly share code, notes, and snippets.

@zoilomora
zoilomora / README.md
Last active June 28, 2024 04:59
How to disable cloud-init in Ubuntu

How to disable cloud-init in Ubuntu

Prevent start

  • Create an empty file to prevent the service from starting

      sudo touch /etc/cloud/cloud-init.disabled
    

Uninstall

@Peregrinox
Peregrinox / dependable mount with systemd.md
Last active November 15, 2021 17:36
Use Systemd mount units to mount partitions that depend on previous init tasks

https://oguya.ch/posts/2015-09-01-systemd-mount-partition/ https://unix.stackexchange.com/questions/246935/set-systemd-service-to-execute-after-fstab-mount

This started because the fuse mounts on /etc/fstab didn´t process right the "nofail" options and the init of the server will fail if external drive are not present. So I need some alternative command to "dependable" automount some folders or partitions.

find the service that auto-mounts your device

systemctl list-units | grep '/media/Elements' | awk '{ print $1 }'
@tuxfight3r
tuxfight3r / s3_upload.sh
Last active March 27, 2024 08:42
AWS - Upload files to S3 via curl
#!/bin/bash -x
#Date: 21/7/2017
#Author: Mohan
#Purpose: To upload files to AWS S3 via Curl
#Uploads file at the top level folder by default
#S3 parameters
S3KEY="XXXXXXXXXXX"
S3SECRET="XXXXXXXXXXXXXXXX"