File tree Expand file tree Collapse file tree 6 files changed +24
-14
lines changed
systemd/system/supervisor.service.d Expand file tree Collapse file tree 6 files changed +24
-14
lines changed Original file line number Diff line number Diff line change 22
33# This is the postinst deb package script. It runs after the package contents are installed.
44
5+ set -e
6+
57if [ -d ~ abc/.ssh ]; then
68 chown -R abc: ~ abc/.ssh
79fi
810
9- if [ -d /var/log/workers ]; then
11+ if [ -d " /var/log/workers" ]; then
1012 chown -R abc: /var/log/workers
1113fi
1214
15+ if [ -d " /etc/supervisor/conf.d" ]; then
16+ rm -rf /etc/supervisor/conf.d
17+ fi
18+
1319if [ -x " /bin/systemctl" ]; then
1420 /bin/systemctl daemon-reload
15- fi
1621
17- rm -rf /etc/supervisor/conf.d
22+ if [ -d " /share/websites/www" ]; then
23+ /bin/systemctl restart supervisor
24+ fi
25+ fi
Original file line number Diff line number Diff line change 22
33# This is the preinst deb package script. It runs before the package is installed.
44
5+ set -e
6+
57# Make a user and group for this app, but only if it does not already exist.
68groupadd --force --non-unique --gid 1001 abc
79id abc > /dev/null 2>&1 || \
Original file line number Diff line number Diff line change @@ -6,12 +6,12 @@ if [ "$1" = "upgrade" ] || [ "$1" = "1" ] ; then
66 exit 0
77fi
88
9- if [ -x " /bin/systemctl" ]; then
10- /bin/systemctl stop supervisor 2> /dev/null
11- fi
12-
139# Put this back.
1410if [ -d /etc/supervisor ]; then
15- rm -f /etc/supervisor/conf.d 2> /dev/null
16- mkdir /etc/supervisor/conf.d 2> /dev/null
11+ rm -f /etc/supervisor/conf.d
12+ mkdir /etc/supervisor/conf.d
13+ fi
14+
15+ if [ -x " /bin/systemctl" ]; then
16+ /bin/systemctl stop supervisor
1717fi
Original file line number Diff line number Diff line change @@ -52,7 +52,10 @@ read -r -d '' PACKAGE_ARGS <<- PACKAGE_ARGS
5252 --vendor='${VENDOR} '
5353PACKAGE_ARGS
5454
55- mkdir -p root/var/log/workers
55+ mkdir -p root/var/log/workers root/config
56+ ln -sf /var/log/workers root/config/log
57+ ln -sf /share/websites/www root/config/www
58+
5659rm -f ${PACKAGE_NAME} _${VERSION} -${ITERATION} _amd64.deb
5760echo fpm -s dir -t deb ${PACKAGE_ARGS} ${DEPENDS} -a amd64 -v ${VERSION} -C root/
5861eval fpm -s dir -t deb ${PACKAGE_ARGS} ${DEPENDS} -a amd64 -v ${VERSION} -C root/
Original file line number Diff line number Diff line change 1- abc ALL=(ALL ) NOPASSWD: /usr/bin/systemctl restart supervisor
1+ abc ALL=(root ) NOPASSWD: /usr/bin/systemctl restart supervisor
Original file line number Diff line number Diff line change 11# Before starting supervisor, we create a symlinks to the Notifiarr-specific files for this server.
22# Those files live in a folder with this server's name, so create a dynamic symlink to reach them at a known path.
33[Service]
4- ExecStartPre=/usr/bin/mkdir -p /config
5- ExecStartPre=/usr/bin/ln -sf /var/log/workers /config/log
6- ExecStartPre=/usr/bin/ln -sf /share/websites/www /config/www
74ExecStartPre=/bin/bash -c 'ln -sf "/share/workers/$(hostname -s)/supervisor/" "/etc/supervisor/conf.d"'
85ExecStartPre=/bin/bash -c 'ln -sf "/share/websites/confs/server.$(hostname -s)" "/config/server.json"'
You can’t perform that action at this time.
0 commit comments