I want to delay start an service on boot. Ubuntu Server 15.10
I've created the file /startup-tvheadend.sh (chmod +x)
#!/bin/bash sleep 20 && service tvheadend start;
Then in crontab -e
@reboot /startup-tvheadend.sh
Running the script as sudo works but not when I reboot the computer. I've disabled the default auto start after installation.
kidkic@TvHeadEnd:~$ systemctl status tvheadend
● tvheadend.service - (null)
Loaded: loaded (/etc/init.d/tvheadend)
Active: inactive (dead)
Docs: man:systemd-sysv-generator(8)
systemctl status tvheadend. – muru Dec 20 '15 at 13:10serviceis in/usr/sbin/andstartis in/sbin- which IIRC are not in cron's default path – steeldriver Dec 20 '15 at 14:00systemctl start tvheadend? – s3lph Dec 20 '15 at 14:27/sbin/and/usr/sbinby default. – s3lph Dec 20 '15 at 23:14cronreads/etc/environment, which has a default PATH defined including those directories. http://askubuntu.com/a/700126/158442 – muru Dec 20 '15 at 23:40