From 446479b3118a1217e359495ac4669931bfed65a9 Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Wed, 26 Sep 2018 15:24:49 +0300 Subject: Packages: removed "loadconfig" and "saveconfig" actions. --- pkg/deb/debian/unit.init | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'pkg/deb') 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 -- cgit