Commit 0b70492f authored by Mathieu Mirmont's avatar Mathieu Mirmont

Add sysv init scripts

parent 256441af
......@@ -12,7 +12,11 @@ Build-Depends: debhelper (>= 12),
Package: socklog
Architecture: any
Depends: runit, ${misc:Depends}, ${shlibs:Depends}
Pre-Depends: ${misc:Pre-Depends}
Depends: runit,
daemon | runit-init | runit-sysv | runit-systemd,
${misc:Depends},
${shlibs:Depends}
Recommends: ipsvd, mailx
Provides: system-log-daemon, linux-kernel-log-daemon
Conflicts: system-log-daemon, linux-kernel-log-daemon
......
......@@ -30,6 +30,14 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
./package/check
endif
override_dh_auto_install:
dh_install
dh_installinit --name socklog-unix
dh_installinit --name socklog-klog
dh_installinit --name socklog-inet --no-enable
dh_installinit --name socklog-ucspi-tcp --no-enable
dh_installinit --name socklog-notify --no-enable
override_dh_installchangelogs:
dh_installchangelogs package/CHANGES
......
# Implied by ${misc:Pre-Depends} that expands to init-system-helpers (>= 1.54~)
socklog: missing-versioned-depends-on-init-system-helpers postinst:152 "update-rc.d defaults-disabled" needs init-system-helpers >= 1.50
socklog: missing-versioned-depends-on-init-system-helpers postinst:165 "update-rc.d defaults-disabled" needs init-system-helpers >= 1.50
socklog: missing-versioned-depends-on-init-system-helpers postinst:178 "update-rc.d defaults-disabled" needs init-system-helpers >= 1.50
#!/usr/bin/env /lib/init/init-d-script
#
### BEGIN INIT INFO
# Provides: socklog-inet
# Required-Start: $time $local_fs
# Required-Stop: $time $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: system log service
### END INIT INFO
#
NAME='socklog-inet'
DESC='network log service'
DAEMON=/usr/sbin/socklog
do_start_cmd_override () {
daemon --noconfig --name "$NAME" -- /usr/bin/runsv "/etc/sv/$NAME"
}
do_stop_cmd_override () {
daemon --noconfig --name "$NAME" --stop
}
do_status_override () {
if daemon --noconfig --name "$NAME" --running; then
log_success_msg "$NAME is running"
else
log_failure_msg "$NAME is not running"
fi
}
#!/usr/bin/env /lib/init/init-d-script
#
### BEGIN INIT INFO
# Provides: socklog-klog
# Required-Start: $time $local_fs
# Required-Stop: $time $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: system log service
### END INIT INFO
#
NAME='socklog-klog'
DESC='kernel log service'
DAEMON=/usr/sbin/socklog
do_start_cmd_override () {
daemon --noconfig --name "$NAME" -- /usr/bin/runsv "/etc/sv/$NAME"
}
do_stop_cmd_override () {
daemon --noconfig --name "$NAME" --stop
}
do_status_override () {
if daemon --noconfig --name "$NAME" --running; then
log_success_msg "$NAME is running"
else
log_failure_msg "$NAME is not running"
fi
}
#!/usr/bin/env /lib/init/init-d-script
#
### BEGIN INIT INFO
# Provides: socklog-notify
# Required-Start: $time $local_fs
# Required-Stop: $time $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: system log service
### END INIT INFO
#
NAME='socklog-notify'
DESC='system log notification service'
DAEMON=/usr/sbin/socklog
do_start_cmd_override () {
daemon --noconfig --name "$NAME" -- /usr/bin/runsv "/etc/sv/$NAME"
}
do_stop_cmd_override () {
daemon --noconfig --name "$NAME" --stop
}
do_status_override () {
if daemon --noconfig --name "$NAME" --running; then
log_success_msg "$NAME is running"
else
log_failure_msg "$NAME is not running"
fi
}
#!/usr/bin/env /lib/init/init-d-script
#
### BEGIN INIT INFO
# Provides: socklog-ucspi-tcp
# Required-Start: $time $local_fs
# Required-Stop: $time $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: system log service
### END INIT INFO
#
NAME='socklog-ucspi-tcp'
DESC='network log service'
DAEMON=/usr/sbin/socklog
do_start_cmd_override () {
daemon --noconfig --name "$NAME" -- /usr/bin/runsv "/etc/sv/$NAME"
}
do_stop_cmd_override () {
daemon --noconfig --name "$NAME" --stop
}
do_status_override () {
if daemon --noconfig --name "$NAME" --running; then
log_success_msg "$NAME is running"
else
log_failure_msg "$NAME is not running"
fi
}
#!/usr/bin/env /lib/init/init-d-script
#
### BEGIN INIT INFO
# Provides: socklog-unix
# Required-Start: $time $local_fs
# Required-Stop: $time $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: system log service
### END INIT INFO
#
NAME='socklog-unix'
DESC='system log service'
DAEMON=/usr/sbin/socklog
do_start_cmd_override () {
daemon --noconfig --name "$NAME" -- /usr/bin/runsv "/etc/sv/$NAME"
}
do_stop_cmd_override () {
daemon --noconfig --name "$NAME" --stop
}
do_status_override () {
if daemon --noconfig --name "$NAME" --running; then
log_success_msg "$NAME is running"
else
log_failure_msg "$NAME is not running"
fi
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment