mailman-web: deploy a rc script for qcluster
This commit is contained in:
parent
86cd9fb733
commit
db54b6ca34
@ -1,5 +1,6 @@
|
||||
drwxr-xr-x root/root etc/
|
||||
drwxr-xr-x root/root etc/rc.d/
|
||||
-rwxr-xr-x root/root etc/rc.d/mailman-qcluster
|
||||
-rwxr-xr-x root/root etc/rc.d/mailman-web
|
||||
drwxr-xr-x root/root etc/webapps/
|
||||
drwxr-xr-x root/root etc/webapps/mailman-web/
|
||||
|
@ -1,8 +1,9 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3wVKDaLR+PFRjaO0m0932ressDrtbA/7ed9ILjvHMl1T0wO+edueDbp8gc2h7CABEiI3ybxTmM6llQ5IQaRsnwA=
|
||||
SHA256 (Pkgfile) = 768b20029a9ddf01f87a01a0b5f537176c0d4469ad64da83e708da638fe0261c
|
||||
SHA256 (.footprint) = c46c7e5a5ba38a7f1e282c33b0fcb805589a3985245d54fc722cdfbf1e72dc5e
|
||||
RWSagIOpLGJF36Hk2EumrNLUVAqjhkofoku91L8M9v/seYF4Virw+mDlKptJ4wxM8tuJimCWroNFn9rghopzauCvWPKa0IhzjgI=
|
||||
SHA256 (Pkgfile) = 77a5d42832de74f99a62301a5aa37aeb3132de7047b52e5a5aa381662a324e06
|
||||
SHA256 (.footprint) = c297b6711c8ef601ace99ceac91da66e0f1d04fb96d40dec0aa595fd42aeb1cd
|
||||
SHA256 (mailman-web-0.0.8.tar.gz) = 9cdfcbf97d91be6eabaa4b1c9ece139f64c0af9f4ee6508939bbdc269e8cd3e4
|
||||
SHA256 (mailman-web.service) = f9ae706a1df0a7d454fde6d8df76decd090246a591d31447e44f6e0f07a0d1f6
|
||||
SHA256 (mailman-qcluster.service) = 0e7ce0ccaeaffb49faf6a5188150ebd82d3835069ff7f5c1ffcf02b52d37a56b
|
||||
SHA256 (settings.py) = cc93831cffbbd67527f984d2698e04aeae115a1d5a696395de0f25d887ad96c0
|
||||
SHA256 (mailman-web-0.0.5-fhs.patch) = 026ab5afcd530f7ce0655211613d9ec1d0c26cc1b87057d85ee0619e5f377a65
|
||||
|
@ -9,6 +9,7 @@ version=0.0.8
|
||||
release=1
|
||||
source=(https://pypi.org/packages/source/m/mailman-web/mailman-web-$version.tar.gz
|
||||
mailman-web.service
|
||||
mailman-qcluster.service
|
||||
settings.py
|
||||
mailman-web-0.0.5-fhs.patch)
|
||||
|
||||
@ -30,4 +31,5 @@ build() {
|
||||
install -vdm 750 "$PKG/var/log/$name/"
|
||||
|
||||
install -Dm755 $SRC/mailman-web.service $PKG/etc/rc.d/$name
|
||||
install -Dm755 $SRC/mailman-qcluster.service $PKG/etc/rc.d/mailman-qcluster
|
||||
}
|
||||
|
45
mailman-web/mailman-qcluster.service
Normal file
45
mailman-web/mailman-qcluster.service
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/rc.d/mailman: start/stop mailman daemon
|
||||
#
|
||||
|
||||
SSD=/sbin/start-stop-daemon
|
||||
PROG=/usr/bin/mailman-web
|
||||
PID=/run/mailman-web/qcluster.pid
|
||||
USER=mailman
|
||||
PORT=8000
|
||||
OPTS="qcluster --settings settings --pythonpath /etc/webapps/mailman-web/"
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
if [ ! -e /run/mailman-web ]; then
|
||||
mkdir -p /run/mailman-web
|
||||
fi
|
||||
$SSD --start -c $USER --background --pidfile $PID --make-pidfile --exec $PROG -- $OPTS
|
||||
;;
|
||||
stop)
|
||||
$SSD --stop -c $USER --retry 10 --pidfile $PID --remove-pidfile
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
status)
|
||||
$SSD --status -u $USER -c $USER --pidfile $PID
|
||||
case $? in
|
||||
0) echo "$PROG is running with pid $(cat $PID)" ;;
|
||||
1) echo "$PROG is not running but the pid file $PID exists" ;;
|
||||
3) echo "$PROG is not running" ;;
|
||||
4) echo "Unable to determine the program status" ;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "usage: $0 [start|stop|restart|reload|status]"
|
||||
;;
|
||||
esac
|
||||
|
||||
# End of file
|
0
mailman-web/mailman-web.service
Executable file → Normal file
0
mailman-web/mailman-web.service
Executable file → Normal file
Loading…
x
Reference in New Issue
Block a user