FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 02cd33c9 authored by Vitor Trovisco's avatar Vitor Trovisco
Browse files

Add new - canto-test-docker-initd (for setting server mode for a testing...

Add new  - canto-test-docker-initd (for setting server mode for a testing branch at /data/export/canto-space
parent b504fd7c
No related branches found
No related tags found
No related merge requests found
#! /bin/sh
# /etc/init.d/canto
# Installation instructions: https://github.com/pombase/canto/blob/master/etc/canto-init.d.md
action=$1
port=$2
WORKERS=5
CANTO_SPACE='/data/export/canto-space/testing'
PID_PATH=import_export/canto-test.pid
# Carry out specific functions when asked to by the system
case "$action" in
start)
echo "Starting Canto with $WORKERS workers"
(date; cd $CANTO_SPACE; canto/script/canto_docker --non-interactive --use-container-name start_server --pid-file=/$PID_PATH --port $port -- script/canto_start --workers $WORKERS --keepalive-timeout 5 -s Starman --preload) >> canto-test.log 2>&1 &
;;
stop)
pid=`/bin/cat $CANTO_SPACE/$PID_PATH`
echo stopping $pid
(cd $CANTO_SPACE; docker exec canto kill -TERM $pid)
;;
restart)
pid=`/bin/cat $CANTO_SPACE/$PID_PATH`
echo restarting $pid
(cd $CANTO_SPACE; docker exec canto kill -HUP $pid)
;;
*)
echo "Usage: $0 {start|restart|stop}"
exit 1
;;
esac
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment