mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
added files for vesta-nginx.deb package
This commit is contained in:
parent
184e90132f
commit
2f7fa3d8d5
5 changed files with 123 additions and 0 deletions
1
src/deb/nginx/conffiles
Normal file
1
src/deb/nginx/conffiles
Normal file
|
@ -0,0 +1 @@
|
|||
/usr/local/vesta/nginx/conf/nginx.conf
|
13
src/deb/nginx/control
Normal file
13
src/deb/nginx/control
Normal file
|
@ -0,0 +1,13 @@
|
|||
Source: vesta-nginx
|
||||
Package: vesta-nginx
|
||||
Version: 0.9.8-1
|
||||
Section: admin
|
||||
Maintainer: Serghey Rodin <skid@vestacp.com>
|
||||
Homepage: http://vestacp.com
|
||||
Architecture: amd64
|
||||
Depends: vesta
|
||||
Description: Vesta Nginx
|
||||
Vesta is an open source hosting control panel.
|
||||
Vesta has a clean and focused interface without the clutter.
|
||||
Vesta has the latest of very innovative technologies.
|
||||
|
11
src/deb/nginx/postinst
Executable file
11
src/deb/nginx/postinst
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" != "configure" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Touch and set permisions on default log files on installation
|
||||
update-rc.d vesta defaults >/dev/null
|
||||
invoke-rc.d vesta start || true
|
6
src/deb/nginx/postrm
Executable file
6
src/deb/nginx/postrm
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
update-rc.d vesta remove >/dev/null 2>&1
|
||||
|
||||
|
||||
exit 0
|
92
src/deb/nginx/vesta
Executable file
92
src/deb/nginx/vesta
Executable file
|
@ -0,0 +1,92 @@
|
|||
#!/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: vesta
|
||||
# internal nginx
|
||||
# internal php-fpm
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: starts the vesta control panel
|
||||
# Description: starts nginx and php-fpm using start-stop-daemon
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
NGINX_DAEMON=/usr/local/vesta/nginx/sbin/vesta-nginx
|
||||
NGINX_NAME=vesta-nginx
|
||||
NGINX_DESC=vesta-nginx
|
||||
NGINX_PID=/var/run/vesta-nginx.pid
|
||||
|
||||
PHP_DAEMON=/usr/local/vesta/php/sbin/vesta-php
|
||||
PHP_NAME=vesta-php
|
||||
PHP_DESC=vesta-php
|
||||
PHP_PID=/var/run/vesta-php.pid
|
||||
|
||||
set -e
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
|
||||
start_nginx() {
|
||||
start-stop-daemon --start --quiet --pidfile $NGINX_PID \
|
||||
--retry 5 --exec $NGINX_DAEMON --oknodo
|
||||
}
|
||||
|
||||
start_php() {
|
||||
start-stop-daemon --start --quiet --pidfile $PHP_PID \
|
||||
--retry 5 --exec $PHP_DAEMON --oknodo
|
||||
}
|
||||
|
||||
stop_nginx() {
|
||||
start-stop-daemon --stop --quiet --pidfile $NGINX_PID \
|
||||
--retry 5 --oknodo --exec $NGINX_DAEMON
|
||||
}
|
||||
|
||||
stop_php() {
|
||||
start-stop-daemon --stop --quiet --pidfile $PHP_PID \
|
||||
--retry 5 --oknodo --exec $PHP_DAEMON
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_daemon_msg "Starting $NGINX_DESC" "$NGINX_NAME"
|
||||
start_nginx
|
||||
log_end_msg $?
|
||||
log_daemon_msg "Starting $PHP_DESC" "$PHP_NAME"
|
||||
start_php
|
||||
log_end_msg $?
|
||||
;;
|
||||
|
||||
stop)
|
||||
log_daemon_msg "Stopping $NGINX_DESC" "$NGINX_NAME"
|
||||
stop_nginx
|
||||
log_end_msg $?
|
||||
log_daemon_msg "Stopping $PHP_DESC" "$PHP_NAME"
|
||||
stop_php
|
||||
log_end_msg $?
|
||||
;;
|
||||
|
||||
restart|force-reload|reload|configtest|testconfig)
|
||||
log_daemon_msg "Restarting $NGINX_DESC" "$NGINX_NAME"
|
||||
stop_nginx
|
||||
stop_php
|
||||
sleep 1
|
||||
start_nginx
|
||||
log_end_msg $?
|
||||
start_php
|
||||
log_end_msg $?
|
||||
;;
|
||||
|
||||
status)
|
||||
status_of_proc -p $NGINX_PID "$NGINX_DAEMON" vesta-nginx
|
||||
status_of_proc -p $PHP_PID "$PHP_DAEMON" vesta-php
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: Vesta {start|stop|restart|status}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue