Apache2, SSH, and similar don't seem to work (unless restarted) upon booting, and logging in graphically to device. To make it work, I have to type
/etc/init.d/apache2 restart, and do the same for SSH. I am planning on having my device without a monitor or keyboard. I setup login automatically, made a shell script restarting the services, and put it in
The reason that didn't work is because I need root privileges to restart a service. I need to restart this without any sort of input or monitor. How can I either allow non-root users to restart apache2, or allow root without password for this executable?
I also tried editing the sudoers file and adding:
username ALL = NOPASSWD: /etc/init.d/apache2 username ALL = NOPASSWD: /etc/init.d/ssh username ALL = /etc/init.d/apache2 username ALL = /etc/init.d/ssh
It still says permission denied upon trying
Debian 8 (Jessie)