Skip to content

Commit

Permalink
pkgadmin: Install cronjob
Browse files Browse the repository at this point in the history
  • Loading branch information
donald committed Aug 15, 2018
1 parent fc217ba commit ea7152e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ fi

: ${systemdunitdir:=$sysconfdir/systemd/system}
: ${udev_rulesdir:=$sysconfdir/udev/rules.d}
: ${crond_dir:=$sysconfdir/cron.d}
: ${udev_helperdir:=$prefix/lib/udev}

: ${INSTALL:=install -v}
: ${INSTALL_PROGRAM:=$INSTALL}
: ${INSTALL_DATA:=$INSTALL -m 644}
: ${INSTALL_CRON:=$INSTALL -m 600}

function need_update()
{
Expand Down Expand Up @@ -69,6 +71,11 @@ function install_data()
install_if "$1" "$2" $INSTALL_DATA
}

function install_cron()
{
install_if "$1" "$2" $INSTALL_CRON
}

umask 022;

mkdir -p "$DESTDIR$usr_bindir"
Expand Down Expand Up @@ -100,6 +107,7 @@ install_exec prun/ptype "$DESTDIR$usr_bindir/pt
install_exec prun/pman "$DESTDIR$usr_bindir/pman"
install_exec put_websafe/put_websafe "$DESTDIR$usrlocal_bindir/put_websafe"
install_exec pkgadmin/pkgadmin "$DESTDIR$usr_sbindir/pkgadmin"
install_cron pkgadmin/crond-pkgadmin "$DESTDIR$crond_dir/pkgadmin"
install_exec mxraid/mxraid "$DESTDIR$usr_sbindir/mxraid"
install_exec mxraid/mxraid_assemble "$DESTDIR$usr_sbindir/mxraid_assemble"
install_data mxraid/mxraid.startup.service "$DESTDIR$systemdunitdir/mxraid.startup.service"
Expand Down
2 changes: 2 additions & 0 deletions pkgadmin/crond-pkgadmin
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
RANDOM_DELAY=240
0 2 * * * root /usr/sbin/pkgadmin update

0 comments on commit ea7152e

Please sign in to comment.