summaryrefslogtreecommitdiffhomepage
path: root/pkg/deb/debian
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/deb/debian')
-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