|
@ -1,11 +1,11 @@ |
|
|
#!/bin/sh /etc/rc.common |
|
|
#!/bin/sh /etc/rc.common |
|
|
# Copyright (C) 2011 OpenWrt.org |
|
|
|
|
|
|
|
|
# Copyright (C) 2015 OpenWrt.org |
|
|
|
|
|
|
|
|
START=50 |
|
|
START=50 |
|
|
|
|
|
|
|
|
SERVICE_USE_PID=1 |
|
|
|
|
|
|
|
|
USE_PROCD=1 |
|
|
|
|
|
|
|
|
start() { |
|
|
|
|
|
|
|
|
start_service() { |
|
|
[ -d /var/spool/cron/atjobs ] || { |
|
|
[ -d /var/spool/cron/atjobs ] || { |
|
|
mkdir -m 0755 -p /var/spool/cron/atjobs |
|
|
mkdir -m 0755 -p /var/spool/cron/atjobs |
|
|
touch /var/spool/cron/atjobs/.SEQ |
|
|
touch /var/spool/cron/atjobs/.SEQ |
|
@ -15,9 +15,12 @@ start() { |
|
|
mkdir -m 0755 -p /var/spool/cron/atspool |
|
|
mkdir -m 0755 -p /var/spool/cron/atspool |
|
|
chown -R nobody:nogroup /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 |
|
|
} |
|
|
} |