busybox: port cron to systemd

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-08-21 15:59:36 +02:00
parent a686acc68f
commit 0fe8fca6d6
2 changed files with 16 additions and 2 deletions

View File

@ -85,8 +85,9 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw -m sha512 $USER_PASSWORD`"
# cron support
if [ "$CRON_SUPPORT" = "yes" ] ; then
mkdir -p $INSTALL/etc/init.d
cp $PKG_DIR/scripts/09_crond $INSTALL/etc/init.d/
mkdir -p $INSTALL/lib/systemd/system
cp $PKG_DIR/system.d.opt/cron.service $INSTALL/lib/systemd/system
enable_service cron.service
fi
enable_service debug-shell.service

View File

@ -0,0 +1,13 @@
[Unit]
Description=Cron daemon
ConditionPathExists=/storage/.cache/services/crond.conf
[Service]
ExecStartPre=/bin/sh -c 'mkdir -p /storage/.cache/cron/crontabs'
ExecStart=/sbin/crond -f -S
KillMode=process
[Install]
WantedBy=multi-user.target