Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A systemd service to manage a Google Cloud Storage bucket mounted with GCSFuse
# https://github.com/GoogleCloudPlatform/gcsfuse
[Unit]
Description=Google Cloud Storage FUSE mounter
After=local-fs.target network-online.target google.service sys-fs-fuse-connections.mount
Before=shutdown.target
[Service]
Type=forking
User=apache
ExecStart=/bin/gcsfuse --key-file=/key/file/path/my-gcs-key.json bucket-name /var/www/html/mysite.com/mount_point
ExecStop=/bin/fusermount -u /var/www/html/mysite.com/mount_point
Restart=always
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment