freewrt_1_0
freewrt_2_0
|
Last change
on this file since 583d755 was 583d755, checked in by Thorsten Glaser <tg@…>, 19 years ago |
- change the SYSV init system to add a target "autostart"
- on system startup, call autostart instead of start
- on autostart, check /etc/rc.conf for whether the service is
enabled and act appropriately; fall through into start target
- move some pre-startup checks into the start target
- some whitespace cleanup, when it makes much sense
(XXX when I get the person who wrote these scripts...)
- optimise dropbear a little
ok and approved wbx@
git-svn-id: svn://www.freewrt.org/trunk/freewrt@191 afb5a338-a214-0410-bd46-81f09a774fd1
|
-
Property mode
set to
100755
|
|
File size:
532 bytes
|
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 |
|
|---|
| 3 | syslog_start() {
|
|---|
| 4 | [ -f /etc/syslog-ng/syslog-ng.conf ] || {
|
|---|
| 5 | echo "/etc/syslog-ng/syslog-ng.conf does not exist !";
|
|---|
| 6 | exit 0;
|
|---|
| 7 | };
|
|---|
| 8 | [ -d /var/run ] || mkdir -p /var/run
|
|---|
| 9 | [ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng
|
|---|
| 10 | }
|
|---|
| 11 |
|
|---|
| 12 | syslog_stop() {
|
|---|
| 13 | killall syslog-ng
|
|---|
| 14 | }
|
|---|
| 15 |
|
|---|
| 16 | case "$1" in
|
|---|
| 17 | autostart|start)
|
|---|
| 18 | syslog_start
|
|---|
| 19 | ;;
|
|---|
| 20 | stop)
|
|---|
| 21 | syslog_stop
|
|---|
| 22 | ;;
|
|---|
| 23 | restart)
|
|---|
| 24 | syslog_stop
|
|---|
| 25 | sleep 1s
|
|---|
| 26 | syslog_start
|
|---|
| 27 | ;;
|
|---|
| 28 | reload)
|
|---|
| 29 | kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null
|
|---|
| 30 | ;;
|
|---|
| 31 | *)
|
|---|
| 32 | echo "Usage: $0 <start|stop|restart|reload>"
|
|---|
| 33 | ;;
|
|---|
| 34 | esac
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.