aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Eichinger <phil@zankapfel.net>2015-11-18 08:55:29 +0100
committerPhil Eichinger <phil@zankapfel.net>2015-11-18 16:36:23 +0100
commita0c7a0948d0f99798beb4d263264680c86d25808 (patch)
treef2b66d12fb73c2e0c28ad4262b84fdd314768840
parentec9f76e848afd409e3b21983472770bd7c565783 (diff)
at: update init script to use procd
also increase PKG_RELEASE Signed-off-by: Phil Eichinger <phil@zankapfel.net>
-rw-r--r--utils/at/Makefile2
-rwxr-xr-xutils/at/files/atd.init17
2 files changed, 11 insertions, 8 deletions
diff --git a/utils/at/Makefile b/utils/at/Makefile
index 0c1473efa..b9a4ef8d4 100644
--- a/utils/at/Makefile
+++ b/utils/at/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=at
PKG_VERSION:=3.1.16
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/a/at
diff --git a/utils/at/files/atd.init b/utils/at/files/atd.init
index 6254d29f2..f293b1ca9 100755
--- a/utils/at/files/atd.init
+++ b/utils/at/files/atd.init
@@ -1,11 +1,11 @@
#!/bin/sh /etc/rc.common
-# Copyright (C) 2011 OpenWrt.org
+# Copyright (C) 2015 OpenWrt.org
START=50
-SERVICE_USE_PID=1
+USE_PROCD=1
-start() {
+start_service() {
[ -d /var/spool/cron/atjobs ] || {
mkdir -m 0755 -p /var/spool/cron/atjobs
touch /var/spool/cron/atjobs/.SEQ
@@ -15,9 +15,12 @@ start() {
mkdir -m 0755 -p /var/spool/cron/atspool
chown -R nobody:nogroup /var/spool/cron/atspool
}
- service_start /usr/sbin/atd
-}
+ procd_open_instance
+
+ procd_set_param command /usr/sbin/atd -f
+ procd_set_param respawn ${respawn_threshold:-3600} ${respawn_timeout:-5} ${respawn_retry:-5}
+ procd_set_param stdout 1 # forward stdout of the command to logd
+ procd_set_param stderr 1 # same for stderr
-stop() {
- service_stop /usr/sbin/atd
+ procd_close_instance
}