I have custom script to mount google drives.
Part of this script, is following code:
if [ ! "$(which google-drive-ocamlfuse)" ] then echo "Install google-drive-ocamlfuse first!" exit 1 fi
Executed from terminal, works like charm.
So, I configured it as service:
[Unit] Description=Mount and umount google drives [Service] User=<usernamehere> Type=oneshot RemainAfterExit=true ExecStart=/home/<usernamehere>/mybscripts/gdrivemounter.sh -m ExecStop=/home/<usernamehere>/mybscripts/gdrivemounter.sh -u Environment="DISPLAY=:0" Environment="XAUTHORITY=/home/<usernamehere>/.Xauthority" [Install] WantedBy=graphical.target
Unfortunately, I see exit code: "Install google-drive-ocamlfuse first!" when I checking service status.
Command which google-drive-ocamlfuse under user and root gives me valid path:
$ which google-drive-ocamlfuse /home/<usernamehere>/.opam/default/bin/google-drive-ocamlfuse
Where is the problem?