sudo nano /etc/rc.local
#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#In order to enable or disable this script just change the execution bits.
#By default this script does nothing.
/home/xtreamcodes/iptv_xtream_codes/start_services.sh
exit 0
-Save it with ctrl+o and exit with ctrl+x, and make file executable with,
sudo chmod +x /etc/rc.local
history -c
Or you can run sh file on reboot with crontab instead of rc.local file.
sudo nano /etc/crontab
-add this
@reboot root /home/xtreamcodes/iptv_xtream_codes/start_services.sh
-save with ctrl+s and exit from nano with ctrl+x.
last reboot
#!/bin/sh -e
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#In order to enable or disable this script just change the execution bits.
#By default this script does nothing.
/home/xtreamcodes/iptv_xtream_codes/start_services.sh
exit 0
-Save it with ctrl+o and exit with ctrl+x, and make file executable with,
sudo chmod +x /etc/rc.local
history -c
Or you can run sh file on reboot with crontab instead of rc.local file.
sudo nano /etc/crontab
-add this
@reboot root /home/xtreamcodes/iptv_xtream_codes/start_services.sh
-save with ctrl+s and exit from nano with ctrl+x.
# выполнять скрипт script каждый день в час ночи #
#
crontab -e
#
/sbin/reboot
0 1 * * * /root/script.sh
Как узнать время через консоль Linux
date
Показ даты и времени всех перезагрузок системыlast reboot
Комментариев нет:
Отправить комментарий