Answer the question
In order to leave comments, you need to log in
Debian autoload commands?
Please tell me how to execute the command with the given parameters after loading the entire system.
Tried creating a local file in /etc/init.d/
#!/bin/sh<br/>
comand -param value<br/>
sudo update-rc.d local defaults 80
Answer the question
In order to leave comments, you need to log in
Without root - you can add it to crontab, where you can specify @reboot instead of dates. There will be no normal control of the startup sequence, etc., but for many purposes this solution is suitable.
/etc/rc.local = auto start.
If you want to add a file to init, then write the script correctly, and not from the bullshit.
in /etc/init.d/ you throw a file something like:
- #!/bin/bash
-
- case $1 in
- start)
- Действие при старте
- ;;
- stop)
- Действие при остановке
- ;;
- restart|reload)
- $0 stop
- sleep 3
- $0 start
- ;;
- status)
- действие при запросе статуса
- ;;
- *)
- echo "Usage: $0 {start|stop|restart|reload|status}"
- exit 1
- ;;
- esac
-
- exit 0
* This source code was highlighted with Source Code Highlighter.
write in /etc/rc.local
the service must be able to start as far as I know in order for it to start from init.d
in order for the script to be executed from init.d during system startup, it must be generated according to the template that is in the file /etc/init.d/sceleton
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question