summaryrefslogtreecommitdiff
path: root/server/pkg/soledad
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2015-05-12 17:49:14 -0300
committerdrebs <drebs@leap.se>2015-05-12 17:49:14 -0300
commitfa7708e256ba56cd1e9913993d68611b4ae95824 (patch)
tree3149d5547b015baf0ca37ecd9421829feff5f45c /server/pkg/soledad
parent365fa1603a977040a1891880a66118f196a54ac0 (diff)
parentbbb19ed9a755a079da5b79567cb98a921c02f2f4 (diff)
Merge tag '0.6.5'
Tag version 0.6.5.
Diffstat (limited to 'server/pkg/soledad')
-rw-r--r--server/pkg/soledad27
1 files changed, 16 insertions, 11 deletions
diff --git a/server/pkg/soledad b/server/pkg/soledad
index 841233d1..ccb3e9b0 100644
--- a/server/pkg/soledad
+++ b/server/pkg/soledad
@@ -19,6 +19,9 @@ CERT_PATH=/etc/leap/soledad-server.pem
PRIVKEY_PATH=/etc/leap/soledad-server.key
TWISTD_PATH=/usr/bin/twistd
HOME=/var/lib/soledad/
+SSL_METHOD=SSLv23_METHOD
+USER=soledad
+GROUP=soledad
[ -r /etc/default/soledad ] && . /etc/default/soledad
@@ -27,36 +30,38 @@ test -r /etc/leap/ || exit 0
. /lib/lsb/init-functions
-case "$1" in
+case "${1}" in
start)
echo -n "Starting soledad: twistd"
- start-stop-daemon --start --quiet --exec $TWISTD_PATH -- \
- --pidfile=$PIDFILE \
- --logfile=$LOGFILE \
+ start-stop-daemon --start --quiet \
+ --user=${USER} --group=${GROUP} \
+ --exec ${TWISTD_PATH} -- \
+ --pidfile=${PIDFILE} \
+ --logfile=${LOGFILE} \
web \
- --wsgi=$OBJ \
- --port=ssl:$HTTPS_PORT:privateKey=$PRIVKEY_PATH:certKey=$CERT_PATH
+ --wsgi=${OBJ} \
+ --port=ssl:${HTTPS_PORT}:privateKey=${PRIVKEY_PATH}:certKey=${CERT_PATH}:sslmethod=${SSL_METHOD}
echo "."
;;
stop)
echo -n "Stopping soledad: twistd"
start-stop-daemon --stop --quiet \
- --pidfile $PIDFILE
+ --pidfile ${PIDFILE}
echo "."
;;
restart)
- $0 stop
- $0 start
+ ${0} stop
+ ${0} start
;;
force-reload)
- $0 restart
+ ${0} restart
;;
status)
- status_of_proc -p $PIDFILE $TWISTD_PATH soledad && exit 0 || exit $?
+ status_of_proc -p ${PIDFILE} ${TWISTD_PATH} soledad && exit 0 || exit ${?}
;;
*)