Hello,
I have simple script /usr/local/bin/test.sh
Then I have this service file: /etc/systemd/system/test.service
Then I run commands:
sudo chmod +x /usr/local/bin/test.sh
...and...
sudo systemctl daemon-reload
After command:
sudo systemctl start test.service
...script will run correctly.
After command:
sudo systemctl enable test.service
...some symlink is created:
Created symlink /etc/systemd/system/multi-user.target.wants/test.service → /etc/systemd/system/test.service.
But after reboot script will not run
Status systemctl status contains:
and
What's wrong with my setup pls?
I have simple script /usr/local/bin/test.sh
Code:
#!/bin/bash
echo $(date) >> /home/hal/Desktop/log
Then I have this service file: /etc/systemd/system/test.service
Code:
[Unit]
Description=Test service
[Service]
ExecStart=/usr/local/bin/test.sh
[Install]
WantedBy=multi-user.target
Then I run commands:
sudo chmod +x /usr/local/bin/test.sh
...and...
sudo systemctl daemon-reload
After command:
sudo systemctl start test.service
...script will run correctly.
After command:
sudo systemctl enable test.service
...some symlink is created:
Created symlink /etc/systemd/system/multi-user.target.wants/test.service → /etc/systemd/system/test.service.
But after reboot script will not run
Status systemctl status contains:
Code:
/usr/local/bin/test.sh: line 2: /home/hal/Desktop/log: No such file or directory
Code:
"Main process exited, code=exited, status=203/EXEC"