summaryrefslogtreecommitdiffhomepage
path: root/pkg/deb/debian/unit.init
diff options
context:
space:
mode:
authorAndrei Belov <defan@nginx.com>2018-09-26 15:24:49 +0300
committerAndrei Belov <defan@nginx.com>2018-09-26 15:24:49 +0300
commit446479b3118a1217e359495ac4669931bfed65a9 (patch)
tree72882b073389930f9ab301fc1da36d2449fa13a1 /pkg/deb/debian/unit.init
parent6b8a992bfa32b3d9a7e7bb4b40a2b9ff1d02e05a (diff)
downloadunit-446479b3118a1217e359495ac4669931bfed65a9.tar.gz
unit-446479b3118a1217e359495ac4669931bfed65a9.tar.bz2
Packages: removed "loadconfig" and "saveconfig" actions.
Diffstat (limited to '')
-rw-r--r--pkg/deb/debian/unit.init30
1 files changed, 1 insertions, 29 deletions
diff --git a/pkg/deb/debian/unit.init b/pkg/deb/debian/unit.init
index b328476a..c991b912 100644
--- a/pkg/deb/debian/unit.init
+++ b/pkg/deb/debian/unit.init
@@ -15,14 +15,9 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/unitd
NAME=unitd
DESC=unitd
-CONFIG=/etc/unit/config
[ -r /etc/default/${NAME} ] && . /etc/default/${NAME}
-if [ -n "$2" ]; then
- CONFIG=$2
-fi
-
#includes lsb functions
. /lib/lsb/init-functions
@@ -72,31 +67,8 @@ case "$1" in
log_end_msg 1
fi
;;
- saveconfig)
- curl -sS --unix-socket /var/run/control.unit.sock localhost >${CONFIG}.new
- if [ $? -ne 0 ]; then
- echo "Could not retreive configuration" >&2
- rm -f ${CONFIG}.new
- exit 1
- fi
- mv ${CONFIG}.new ${CONFIG}
- echo "The following configuration has been saved to ${CONFIG}:"
- cat ${CONFIG}
- ;;
- loadconfig)
- if [ ! -e ${CONFIG} ]; then
- echo "Could not find ${CONFIG} for loading" >&2
- exit 1
- fi
- echo "Loading configuration from ${CONFIG}..."
- curl -sS -X PUT --data-binary @${CONFIG} --unix-socket /var/run/control.unit.sock localhost
- if [ $? -ne 0 ]; then
- echo "Loading failed!" >&2
- exit 1
- fi
- ;;
*)
- echo "Usage: /etc/init.d/$NAME {start|status|stop|restart|reload|force-reload|saveconfig|loadconfig}" >&2
+ echo "Usage: /etc/init.d/$NAME {start|status|stop|restart|reload|force-reload}" >&2
exit 1
;;
esac