Skip to content

Commit d6bc2d9

Browse files
committed
deal with conf.d directly
1 parent 50d7ba6 commit d6bc2d9

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

after-install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ fi
1313
if [ -x "/bin/systemctl" ]; then
1414
/bin/systemctl daemon-reload
1515
fi
16+
17+
rm -rf /etc/supervisor/conf.d

before-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ groupadd --force --non-unique --gid 1001 abc
77
id abc >/dev/null 2>&1 || \
88
useradd --non-unique --create-home --uid 1001 --gid 1001 --groups users abc
99

10-
mkdir -p ~abc/.ssh
10+
mkdir -p ~abc/.ssh /config

before-remove.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,12 @@ if [ "$1" = "upgrade" ] || [ "$1" = "1" ] ; then
66
exit 0
77
fi
88

9-
# do stuff here.
9+
if [ -x "/bin/systemctl" ]; then
10+
/bin/systemctl stop supervisor 2>/dev/null
11+
fi
12+
13+
# Put this back.
14+
if [ -d /etc/supervisor ]; then
15+
rm -f /etc/supervisor/conf.d 2>/dev/null
16+
mkdir /etc/supervisor/conf.d 2>/dev/null
17+
fi

root/etc/supervisor/conf.d/notifiarr-workers.conf

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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/find /etc/supervisor/conf.d -type l -delete
5-
ExecStartPre=/bin/bash -c 'for file in /share/workers/$(hostname -s)/supervisor/*.conf ;do ln -s $file /etc/supervisor/conf.d/ ;done'
4+
ExecStartPre=/usr/bin/rm -rf /etc/supervisor/conf.d
5+
ExecStartPre=/bin/bash -c 'ln -sf "/share/workers/$(hostname -s)/supervisor/" "/etc/supervisor/conf.d"'
66
ExecStartPre=/usr/bin/mkdir -p /config
77
ExecStartPre=/bin/bash -c 'ln -sf "/share/websites/confs/server.$(hostname -s)" "/config/server.json"'

0 commit comments

Comments
 (0)