SOLVED If any lost souls find themselves here in a similar situation let it be known that the file that worked for me was creating a file at ‘%h/.config/systemd/user/google-drive-ocamlfuse.service’ with the following content:
[Unit]
Description=FUSE filesystem over Google Drive
After=network.target
[Service]
ExecStart=google-drive-ocamlfuse %h/googledrive
ExecStop=fusemount -u %h/googledrive
Restart=always
RestartSec=300
Type=forking
[Install]
WantedBy=default.target
Howdy, I have very recently installed Opensuse Tumbleweed alongside Windows 10 (On a seperate drive) and am trying to get things setup to where I can fully transition to linux. One of the first things I have hit a wall on is getting a file to execute on boot using systemd.
I am trying to use this package to be able to access my google drive from Dolphin. And so far it works okay. Except that it doesn’t survive a reboot. I have to run the command:
google-drive-ocamlfuse ~/googledrive
after each reboot in order for the google drive directories to be accessible. So I googled how to make that happen automagically on boot and found this guide that helped me get a startup script going.
I created /usr/local/bin/ocamlfuseStartup.sh as a file that contains the command from before:
google-drive-ocamlfuse ~/googledrive
and verified that it works as intended when I enter ./ocamlfuseStartup.sh from that directory.
I then created another file at /usr/lib/systemd/system/startup.service that contains the following:
[Unit]
Description=Startup Script
[Service]
ExecStart=/bin/bash /usr/local/bin/ocamlfuseStartup.sh
[Install]
WantedBy=multi-user.target
I have no idea what the /bin/bash portion is for because I found it from a googling but without it I get the following error:
startup.service: Main process exited, code=exited, status=203/EXEC
However with it I get this error:
startup.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
which I take to mean that there is something wrong with my ocamlfuseStartup.sh file maybe? But since it works when I manually execute the file I’m kind of at a loss.
I found this thread where it seemed like someone else was having a similar issue but I didn’t really grok what they were talking about.
Any and all help is greatly appreciated!
deleted by creator
Is Tumbleweed really immutable? I thought it was just an RPM-based rolling release distro.
Oh I see. I’m still pretty new to linux so I didn’t realize that tumbleweed was immutable and I guess it also didn’t really dawn on me that I was monkeying around in protected directories as I followed along with various resources trying to understand the commands and things. I now see how that could cause some issues.
So I guess a better question would be, what is the best way to go about getting an immutable distro to run that command for me at boot? cron job? Thanks for your guidance.
deleted by creator
Sarcasm? I guess I’m too high to communicate lol thanks anyway.
I’m sober and didn’t sense sarcasm. I don’t think it’s you.