zip: move to github
[packages.git] / utils / at / files / atd.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2011 OpenWrt.org
3
4 START=50
5
6 SERVICE_USE_PID=1
7
8 start() {
9         [ -d /var/spool/cron/atjobs ] || {
10                 mkdir -m 0755 -p /var/spool/cron/atjobs
11                 touch /var/spool/cron/atjobs/.SEQ
12                 chown -R nobody:nogroup /var/spool/cron/atjobs
13         }
14         [ -d /var/spool/cron/atspool ] || {
15                 mkdir -m 0755 -p /var/spool/cron/atspool
16                 chown -R nobody:nogroup /var/spool/cron/atspool
17         }
18         service_start /usr/sbin/atd
19 }
20
21 stop() {
22         service_stop /usr/sbin/atd
23 }