We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 84e9967 + 91c7608 commit 4193dd3Copy full SHA for 4193dd3
tubesync/restart_services.sh
@@ -0,0 +1,26 @@
1
+#!/usr/bin/env sh
2
+
3
+dir='/run/service'
4
+svc_path() (
5
+ cd "${dir}"
6
+ realpath -e -s "$@"
7
+)
8
9
+if [ 0 -eq $# ]
10
+then
11
+ set -- \
12
+ $( cd "${dir}" && svc_path tubesync*-worker ) \
13
+ "$( svc_path gunicorn )" \
14
+ "$( svc_path nginx )"
15
+fi
16
17
+for service in $( svc_path "$@" )
18
+do
19
+ printf -- 'Restarting %-28s' "${service#${dir}/}..."
20
+ _began="$( date '+%s' )"
21
+ /command/s6-svc -wr -r "${service}"
22
+ _ended="$( date '+%s' )"
23
+ printf -- '\tcompleted (in %2.1d seconds).\n' \
24
+ "$( expr "${_ended}" - "${_began}" )"
25
+done
26
+unset -v _began _ended service
0 commit comments