busybox: cron: always start if not cinfigured via settings addon

This commit is contained in:
Stefan Saraev 2013-08-28 21:19:56 +03:00
parent 246f507f74
commit d020cadf81
4 changed files with 17 additions and 0 deletions

View File

@ -84,6 +84,10 @@ USER_PWD="`$ROOT/$TOOLCHAIN/bin/cryptpw -m sha512 $USER_PASSWORD`"
mkdir -p $INSTALL/lib/systemd/system
cp $PKG_DIR/system.d.opt/cron.service $INSTALL/lib/systemd/system
enable_service cron.service
mkdir -p $INSTALL/usr/share/services
cp -P $PKG_DIR/default.d/*.conf $INSTALL/usr/share/services
cp $PKG_DIR/system.d.opt/cron-defaults.service $INSTALL/lib/systemd/system
enable_service cron-defaults.service
fi
enable_service debug-shell.service

View File

@ -0,0 +1,11 @@
[Unit]
Description=Cron defaults
After=local-fs.target
ConditionPathExists=!/storage/.cache/services/crond.conf
ConditionPathExists=!/storage/.cache/services/crond.disabled
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'cp /usr/share/services/crond.conf /storage/.cache/services'
RemainAfterExit=yes

View File

@ -1,5 +1,7 @@
[Unit]
Description=Cron daemon
After=syslog.target cron-defaults.service
Requires=cron-defaults.service
ConditionPathExists=/storage/.cache/services/crond.conf