Script in init.d
Jump to navigation
Jump to search
- 1. Create a script in the /etc/init.d directory.
- below is for a script named blah which should be owned by root with ACL of 755
- The script requires a init script LSB header of the form
- ### BEGIN INIT INFO
- # Provides: blah
- # Required-Start: $local_fs $remote_fs $network $syslog $named
- # Required-Stop: $local_fs $remote_fs $network $syslog $named
- # Default-Start: 2 3 4 5
- # Default-Stop: 0 1 6
- # X-Interactive: true
- # Short-Description: provides blah
- # Description: longer multiline description
- ### END INIT INFO
- 2. Enable script bt running
- $ sudo update-rc.d blah defaults