Debian — запуск скриптов при загрузке системы, screen и запуск в фоне gunthy



/etc/init.d/

nano blah



#! /bin/sh
# /etc/init.d/blah
# https://debian-administration.org/article/28/Making_scripts_run_at_boot_time_with_Debian

# Some things that run always
touch /var/lock/blah

# Carry out specific functions when asked to by the system
case "$1" in
  start)
    echo "Starting script blah "

    cd /home/pi/arm
    screen  -d -m  ./gunthy-arm

    ;;
  stop)
    echo "Stopping script blah"
    echo "Could do more here"
    ;;
  *)
    echo "Usage: /etc/init.d/blah {start|stop}"
    exit 1
    ;;
esac

exit 0



chmod 755 /etc/init.d/blah
update-rc.d blah defaults

Добавить комментарий

Ваш e-mail не будет опубликован.