diff --git a/contrib/systemd/README.md b/contrib/systemd/README.md index a3ea9bc..5912950 100644 --- a/contrib/systemd/README.md +++ b/contrib/systemd/README.md @@ -2,8 +2,9 @@ This unit file allows you to automatically start gitlabfs as a systemd unit. ## Install 1. Install gitlabfs using `go get` -2. Copy **gitlabfs@.service** into **~/.config/systemd/user**. Create the folder if it does not exists. -3. Reload systemd: `systemctl --user daemon-reload` +2. Run `which gitlabfs` to verify that gitlabfs is present in your PATH. if the command fail, you may need to add **$HOME/go/bin** to your PATH. +3. Copy **gitlabfs@.service** into **~/.config/systemd/user**. Create the folder if it does not exists. +4. Reload systemd: `systemctl --user daemon-reload` ## Usage 1. Create your gitlabfs config file in **~/.config/gitlabfs** eg: **~/.config/gitlabfs/gitlab.com.yaml**. Make sure the config file name ends with **.yaml** and a mountpoint is configured in the file. diff --git a/contrib/systemd/gitlabfs@.service b/contrib/systemd/gitlabfs@.service index 0e8cdc4..6ede4ab 100644 --- a/contrib/systemd/gitlabfs@.service +++ b/contrib/systemd/gitlabfs@.service @@ -1,9 +1,10 @@ [Unit] Description=FUSE filesystem for gitlab groups and projects (%i) +Wants=network-online.target After=network-online.target [Service] ExecStart=%h/go/bin/gitlabfs -config %E/gitlabfs/%i.yaml [Install] -WantedBy=network-online.target \ No newline at end of file +WantedBy=default.target \ No newline at end of file