I would like to execute a series of commands upon reboot, inside a SCREEN environment. I can do this via my crontab:
@reboot /usr/bin/screen -d -m -S myPseudoDaemon /path/to/something.sh
...so I could just put the commands in 'something.sh'. What complicates this case, is that the series of commands includes a sudo and a chroot:
sudo -i # become root
chroot /opt/debianUnstable # enter the chroot-ed Debian unstable
/bin/bash # source my bash setting, including mandatory env vars
/path/to/whatever.sh # the actual "daemon"
Any idea how I could do this?
sudoerslist.