Systemd Service running bash script fails

Support

Hey guys,

as the Title says...I created a bash script to sync google drive folders with local folders to emulate the offline access feature of the windows desktop client. The script works as intended when I run it from the terminal. Since I want have the script running automatically I created a new service in /etc/systemd/system named GdriveOffSync.service. The content in the Service file is as follows:

[Unit]

Description=gDrive Synchronise

After=network.target

[Service]

ExecStart=/usr/local/bin/GdriveOffSync.sh

Type=simple

Restart=always

RestartSec=4

WorkingDirectory=/usr/local/bin

[Install]

WantedBy=multi-user.target

After saving the service, I did sudo systemctl daemon-reload followed by the commands to enable and then start the service. When I check the status with systemctl status GdriveOffSync.service it shows me that the service has failed with the exit code 203/EXEC.

I have programming experience but am a big time linux noob. Please someone help me understand why the service won't start when the script is working by itself. All the service has to do is call the script, the script runs in an endless loop with a sleep time of 30 seconds.

Posted May 27, 2026, 11:14 AM UTC

657

Comments aren't archived yet

This post had 57 comments on Reddit. Comments for this period haven't been loaded into the archive yet.