mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
make syslog work with our new start/stop scripts. It is still full of race
conditions and dependencies don't work yet, but it's a start svn path=/nixpkgs/trunk/; revision=5023
This commit is contained in:
parent
6562861ba4
commit
9159ca026d
@ -42,14 +42,20 @@ start() {
|
||||
# launch all preferred dependencies
|
||||
#start_softdeps
|
||||
# launch our own program
|
||||
startService
|
||||
# if successful, then register
|
||||
register
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo "stopping $prog"
|
||||
# are we running? If so, then stop, otherwise, do nothing...
|
||||
if test -a $STATDIR/$prog = 0; then
|
||||
if ! test -a $STATEDIR/$prog; then
|
||||
exit 0
|
||||
fi
|
||||
# stop our own program
|
||||
stopService
|
||||
unregister
|
||||
}
|
||||
|
||||
register() {
|
||||
@ -62,7 +68,7 @@ unregister() {
|
||||
|
||||
status() {
|
||||
# are we running? If so, report
|
||||
if test -a $STATDIR/$prog; then
|
||||
if test -a $STATEDIR/$prog; then
|
||||
echo "running"
|
||||
else
|
||||
echo "stopped"
|
||||
|
@ -27,6 +27,8 @@ startService()
|
||||
stopService()
|
||||
{
|
||||
echo -n "Stopping $prog:"
|
||||
kill `cat /var/run/syslogd.pid`
|
||||
kill `cat /var/run/klogd.pid`
|
||||
}
|
||||
|
||||
reloadService()
|
||||
|
Loading…
Reference in New Issue
Block a user