diff --git a/debian/control b/debian/control index a10527c2d2..1455cec6b0 100644 --- a/debian/control +++ b/debian/control @@ -44,41 +44,8 @@ Homepage: http://sipwise.com/ Package: ngcp-panel Architecture: all -Depends: ngcp-panel-common (>= 1.0.15), - ngcp-panel-nginx | ngcp-panel-apache -Description: Catalyst based application - A completely overhauled provisioning interface for the - NGCP system. - . - This is a dependency package to install either ngpcp-panel-nginx - (by default) or ngcp-panel-apache. - -Package: ngcp-panel-apache -Architecture: all Pre-Depends: apache2.2-common, libapache2-mod-perl2 -Depends: ngcp-panel-common (= ${binary:Version}), - ${misc:Depends} -Conflicts: ngcp-panel-nginx -Description: Catalyst based application. Using mod-perl - A completely overhauled provisioning interface for the - NGCP system. - -Package: ngcp-panel-nginx -Architecture: all -Pre-Depends: nginx-common, - ngcp-panel-common (= ${binary:Version}) -Depends: libfcgi-procmanager-perl, - ${misc:Depends} -Conflicts: ngcp-panel-apache -Description: Catalyst based application. Using starman+nginx - A completely overhauled provisioning interface for the - NGCP system. - -Package: ngcp-panel-common -Architecture: all -Replaces: ngcp-panel (<< 1.0.15) -Breaks: ngcp-panel (<< 1.0.15) Depends: libcatalyst-actionrole-acl-perl, libcatalyst-modules-perl, libcatalyst-perl (>= 5.90040), diff --git a/debian/ngcp-panel-apache.install b/debian/ngcp-panel-apache.install deleted file mode 100644 index 6623e9f935..0000000000 --- a/debian/ngcp-panel-apache.install +++ /dev/null @@ -1 +0,0 @@ -etc/apache2/ngcp-panel etc/apache2/sites-available/ diff --git a/debian/ngcp-panel-apache.postinst b/debian/ngcp-panel-apache.postinst deleted file mode 100644 index c3128b276d..0000000000 --- a/debian/ngcp-panel-apache.postinst +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -set -e - -# don't do anything when called with other argument than configure -case "$1" in - configure) - ;; - abort-upgrade|abort-remove|abort-deconfigure) - exit 0 - ;; - *) - echo "postinst called with unknown argument \$1'" >&2 - exit 1 - ;; -esac - -# enable required modules -a2enmod ssl perl - -# enable optional modules -a2enmod dump_io || echo "Missing some optional Apache module(s), ignoring." - -# disable debian's default Apache site -if [ -e /etc/apache2/sites-enabled/default ]; then - a2dissite default -fi - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 \ No newline at end of file diff --git a/debian/ngcp-panel-apache.preinst b/debian/ngcp-panel-apache.preinst deleted file mode 100644 index 5744d785fb..0000000000 --- a/debian/ngcp-panel-apache.preinst +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# preinst script for #PACKAGE# -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - install|upgrade) - if [ -e /etc/ningx/sites-enabled/ngcp-panel ]; then - echo "Deactivating ngcp-panel on nginx" - rm /etc/ningx/sites-enabled/ngcp-panel - flag_restart=1 - fi - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# reload nginx -if [ -x /etc/init.d/nginx ] && [ ! -z "$flag_restart" ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d nginx restart || true - else - /etc/init.d/nginx restart || true - fi -fi - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/ngcp-panel-common.install b/debian/ngcp-panel-common.install deleted file mode 100644 index 1c812b48d6..0000000000 --- a/debian/ngcp-panel-common.install +++ /dev/null @@ -1,3 +0,0 @@ -ngcp_panel.conf etc/ngcp-panel/ -share/* usr/share/ngcp-panel/ -debian/tmp/usr/share/* usr/share/ diff --git a/debian/ngcp-panel-nginx.init b/debian/ngcp-panel-nginx.init deleted file mode 100644 index 61dbf3a23f..0000000000 --- a/debian/ngcp-panel-nginx.init +++ /dev/null @@ -1,103 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: ngcp-panel -# Required-Start: $syslog $network $local_fs $remote_fs $time mysql -# Required-Stop: $syslog $network $local_fs $remote_fs mysql -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Start the ngcp-panel webapp -# Description: Start the ngcp-panel webapp -### END INIT INFO - -. /lib/lsb/init-functions - -DAEMON=/usr/share/ngcp-panel/ngcp_panel_fastcgi.pl -HOMEDIR=/usr/share/ngcp-panel -PIDFILE=/var/run/ngcp-panel.pid -USER=www-data -GROUP=www-data -NAME="ngcp_panel_fastcgi" -DESC="NGCP-Panel Webapp" -USOCKET=/var/run/ngcp-panel.sock -LOGERR=/var/log/ngcp/ngcp-panel.log -NPROC=1 - -OPTIONS="--listen $USOCKET --daemon --pidfile $PIDFILE --nproc $NPROC" - -check_running() { - [ -s $PIDFILE ] && kill -0 $(cat $PIDFILE) >/dev/null 2>&1 -} - -_start() { - rm -f $PIDFILE 2>/dev/null - start-stop-daemon --start --quiet --pidfile $PIDFILE \ - --exec $DAEMON --chdir $HOMEDIR \ - --user $USER --group $GROUP \ - -- $OPTIONS || log_failure_msg "error" -} - -start() { - log_daemon_msg "Starting $DESC: $NAME" - if check_running; then - log_progress_msg "already running" - log_end_msg 0 - exit 0 - fi - _start - log_end_msg $? - return $? -} - -_stop() { - if [ -e $PIDFILE ]; then - if ! check_running ; then - log_daemon_msg " not running" - return 0 - fi - kill `cat $PIDFILE`; - for i in 1 2 3 4 5 6 7; do - echo -n "." - sleep 1; - if check_running ; then - return 0 - fi - done - if check_running ; then - return 1; - fi - fi -} - -stop() { - log_daemon_msg "Stopping $DESC: $NAME" - _stop - log_end_msg $? - return $? -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart|force-reload) - log_daemon_msg "Restarting web application" $NAME - _stop - _start - log_end_msg $? - return $? - ;; - status) - log_daemon_msg "Status of $DESC: " - status_of_proc -p$PIDFILE $DAEMON $NAME - ;; - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload|status}" >&2 - exit 1 - ;; -esac - -exit 0 diff --git a/debian/ngcp-panel-nginx.install b/debian/ngcp-panel-nginx.install deleted file mode 100644 index 9714f71b8c..0000000000 --- a/debian/ngcp-panel-nginx.install +++ /dev/null @@ -1,2 +0,0 @@ -ngcp_panel.psgi usr/share/ngcp-panel/ -script/ngcp_panel_fastcgi.pl user/share/ngcp-panel/ diff --git a/debian/ngcp-panel-nginx.links b/debian/ngcp-panel-nginx.links deleted file mode 100644 index 451058267b..0000000000 --- a/debian/ngcp-panel-nginx.links +++ /dev/null @@ -1 +0,0 @@ -etc/nginx/sites-available/ngcp-panel etc/nginx/sites-enabled/ngcp-panel diff --git a/debian/ngcp-panel-nginx.postinst b/debian/ngcp-panel-nginx.postinst deleted file mode 100644 index 3bcc3b78c0..0000000000 --- a/debian/ngcp-panel-nginx.postinst +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -# don't do anything when called with other argument than configure -case "$1" in - configure) - ;; - abort-upgrade|abort-remove|abort-deconfigure) - exit 0 - ;; - *) - echo "postinst called with unknown argument \$1'" >&2 - exit 1 - ;; -esac - -# reload nginx -if [ -x /etc/init.d/nginx ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d nginx restart || true - else - /etc/init.d/nginx restart || true - fi -fi - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 \ No newline at end of file diff --git a/debian/ngcp-panel-nginx.preinst b/debian/ngcp-panel-nginx.preinst deleted file mode 100644 index 19a779621e..0000000000 --- a/debian/ngcp-panel-nginx.preinst +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -# preinst script for #PACKAGE# -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - install|upgrade) - if [ -e /etc/apache2/sites-enabled/ngcp-panel ]; then - echo "Deactivating ngcp-panel on apache" - rm /etc/apache2/sites-enabled/ngcp-panel - flag_restart=1 - fi - ;; - - abort-upgrade) - ;; - - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# reload nginx -if [ -x /etc/init.d/apache2 ] && [ ! -z "$flag_restart" ]; then - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - invoke-rc.d apache2 restart || true - else - /etc/init.d/apache2 restart || true - fi -fi - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/rules b/debian/rules index 38dcab5adf..6dd6c4b4ba 100755 --- a/debian/rules +++ b/debian/rules @@ -1,12 +1,11 @@ #!/usr/bin/make -f -# Uncomment this to turn on verbose mode. -export DH_VERBOSE=1 - -# This has to be exported to make some magic below work. -export DH_OPTIONS - %: dh $@ +override_dh_install: + dh_install + # remove all *.pl scripts, they are for development usage only + rm -rf ./debian/ngcp-panel/usr/bin + override_dh_auto_test: echo "TODO / FIXME - skipping dh_auto_test" diff --git a/etc/nginx/ngcp-panel b/etc/nginx/ngcp-panel deleted file mode 100644 index 33b1dc6e96..0000000000 --- a/etc/nginx/ngcp-panel +++ /dev/null @@ -1,17 +0,0 @@ -server { - listen 1443; - ssl on; - ssl_certificate /etc/apache2/ssl/myserver.crt; - ssl_certificate_key /etc/apache2/ssl/myserver.pem; - - location / { - include fastcgi_params; - # adjust parameters for PSGI compatibility - fastcgi_param SCRIPT_NAME ''; - fastcgi_param PATH_INFO $fastcgi_script_name; - fastcgi_pass 127.0.1.1:1433; - } - location /static { - root /usr/share/ngcp-panel; - } -}