Skip to content

Commit fb701a7

Browse files
committed
Fix and update init script after ChirpStack rename.
1 parent e4712da commit fb701a7

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packaging/files/chirpstack-gateway-bridge.init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function do_start {
4141
}
4242

4343
function do_stop {
44-
start-stop-daemon --stop --retry=TERM/30/KILL/5 --pidfile "$PID_FILE" --name "$NAME"
44+
start-stop-daemon --stop --retry=TERM/30/KILL/5 --pidfile "$PID_FILE" --exec "$DAEMON"
4545
retval="$?"
4646
sleep 1
4747
return "$retval"

packaging/scripts/post-install.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,20 @@ function restart_service {
3232
fi
3333
}
3434

35+
function create_logdir {
36+
if [[ ! -d $LOG_DIR ]]; then
37+
mkdir -p $LOG_DIR
38+
chown -R $DAEMON_USER:$DAEMON_GROUP $LOG_DIR
39+
fi
40+
}
41+
3542
# create user
3643
id $DAEMON_USER &>/dev/null
3744
if [[ $? -ne 0 ]]; then
3845
useradd --system -U -M $DAEMON_USER -s /bin/false -d /etc/$NAME
3946
fi
4047

41-
mkdir -p "$LOG_DIR"
42-
chown $DAEMON_USER:$DAEMON_GROUP "$LOG_DIR"
48+
create_logdir
4349

4450
# set the configuration owner / permissions
4551
if [[ -f /etc/$NAME/$NAME.toml ]]; then

0 commit comments

Comments
 (0)