debian: deprecate usage of /etc/init.d/authentic2 manage (fixes #11008)

adding a command to /etc/init.d/authentic2 was a bad idea anyway and would
force us to use sudo -E so that /etc/default/authentic2 is visible from
authentic2-ctl.

Also replace cron.hourly files by cron.d files.
This commit is contained in:
Benjamin Dauvergne 2016-05-20 16:01:30 +02:00
parent e1e555adbf
commit d08992307c
12 changed files with 34 additions and 28 deletions

View File

@ -13,6 +13,10 @@ if [ "$(whoami)" != "authentic" ]; then
fi
fi
if [ -f /etc/default/authentic2 ]; then
. /etc/default/authentic2
fi
if [ -f /etc/authentic2/db.conf ]; then
. /etc/authentic2/db.conf
fi

View File

@ -0,0 +1,5 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 * * * * authentic authentic2-multitenant-manage tenant_command clearsessions --all-tenants
5 * * * * authentic authentic2-multitenant-manage tenant_command cleanupauthentic --all-tenants
10 * * * * authentic authentic2-multitenant-manage tenant_command sync-ldap-users --all-tenants

View File

@ -1,5 +1,3 @@
#!/bin/sh
authentic2-multitenant-manage tenant_command clearsessions --all-tenants
authentic2-multitenant-manage tenant_command cleanupauthentic --all-tenants
authentic2-multitenant-manage tenant_command sync-ldap-users --all-tenants
exit 0

View File

@ -0,0 +1,6 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 * * * * authentic authentic2-ctl clearsessions
5 * * * * authentic authentic2-ctl cleanupauthentic
10 * * * * authentic authentic2-ctl sync-ldap-users

View File

@ -1,5 +1,3 @@
#!/bin/sh
/usr/sbin/service authentic2 manage clearsessions
/usr/sbin/service authentic2 manage cleanupauthentic
/usr/sbin/service authentic2 manage sync-ldap-users
exit 0

View File

@ -195,14 +195,6 @@ case "$1" in
;;
esac
;;
manage)
shift
if [ $(id -un) != "$USER" ]; then
sudo -u $USER -- $MANAGE_SCRIPT "$@"
else
$MANAGE_SCRIPT "$@"
fi
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|update|reload}" >&2
exit 3

View File

@ -13,6 +13,10 @@ if [ "$(whoami)" != "authentic" ]; then
fi
fi
if [ -f /etc/default/authentic2 ]; then
. /etc/default/authentic2
fi
if [ -f /etc/authentic2/db.conf ]; then
. /etc/authentic2/db.conf
fi

View File

@ -0,0 +1,5 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 * * * * authentic authentic2-multitenant-manage tenant_command clearsessions --all-tenants
5 * * * * authentic authentic2-multitenant-manage tenant_command cleanupauthentic --all-tenants
10 * * * * authentic authentic2-multitenant-manage tenant_command sync-ldap-users --all-tenants

View File

@ -1,5 +1,3 @@
#!/bin/sh
authentic2-multitenant-manage tenant_command clearsessions --all-tenants
authentic2-multitenant-manage tenant_command cleanupauthentic --all-tenants
authentic2-multitenant-manage tenant_command sync-ldap-users --all-tenants
exit 0

View File

@ -0,0 +1,6 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
0 * * * * authentic authentic2-ctl clearsessions
5 * * * * authentic authentic2-ctl cleanupauthentic
10 * * * * authentic authentic2-ctl sync-ldap-users

View File

@ -1,5 +1,3 @@
#!/bin/sh
/usr/sbin/service authentic2 manage clearsessions
/usr/sbin/service authentic2 manage cleanupauthentic
/usr/sbin/service authentic2 manage sync-ldap-users
exit 0

View File

@ -195,14 +195,6 @@ case "$1" in
;;
esac
;;
manage)
shift
if [ $(id -un) != "$USER" ]; then
sudo -u $USER -- $MANAGE_SCRIPT "$@"
else
$MANAGE_SCRIPT "$@"
fi
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|restart|update|reload}" >&2
exit 3