First we must create the script in /etc/init.d.
#vi /etc/init.d/myscript.sh
#!/bin/bash
sleep 10 &&
conky &
exit
After creating the script in the /etc/init.d we should give execute permission with the chmod command.
#chmod +x myscript.sh
Now we go using command:
update-rc.d /etc/init.d/myscritp.sh defaults
This exemple will go initialize the conky a software the hardware monitoring. When the system up, the script will initialize with the operational system.
If you want to remove the script from system startup:
- You can delete the script
- Remove permission with the command
- Or remove the boot witch own update-rc.d
Nenhum comentário:
Postar um comentário