mirror of
https://github.com/marcus-alicia/iRedAdmin-Pro-SQL.git
synced 2026-05-27 23:49:42 +00:00
Add files via upload
This commit is contained in:
23
rc_scripts/iredadmin.openbsd
Normal file
23
rc_scripts/iredadmin.openbsd
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/bin/ksh
|
||||
# Author: Zhang Huangbin <zhb@iredmail.org>
|
||||
# Purpose: Start/stop iRedAdmin uwsgi instance.
|
||||
|
||||
RUN_DIR='/var/run/iredadmin'
|
||||
PID_FILE="${RUN_DIR}/iredadmin.pid"
|
||||
UWSGI_INI_FILE='/opt/www/iredadmin/rc_scripts/uwsgi/openbsd.ini'
|
||||
|
||||
daemon="/usr/local/bin/uwsgi --ini ${UWSGI_INI_FILE} --log-syslog --pidfile ${PID_FILE} --daemonize /dev/null"
|
||||
daemon_user='iredadmin'
|
||||
daemon_group='iredadmin'
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_pre() {
|
||||
install -d -o ${daemon_user} -g ${daemon_group} -m 0775 ${RUN_DIR}
|
||||
}
|
||||
|
||||
rc_stop() {
|
||||
kill -INT `cat ${PID_FILE}`
|
||||
}
|
||||
|
||||
rc_cmd $1
|
||||
Reference in New Issue
Block a user