systemd user unit do not support network-online.target, use default.target instead

This commit is contained in:
Massaki Archambault 2021-08-13 13:40:15 -04:00
parent 86618a82f5
commit fb11c3f5c5
2 changed files with 5 additions and 3 deletions

View File

@ -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.

View File

@ -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
WantedBy=default.target