Skip to content

Commit eb8e25a

Browse files
committed
Improved deb and rpm install scripts
1 parent 61a65fa commit eb8e25a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

scripts/postinstall.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ install() {
1010
# Package upgrade
1111
upgrade() {
1212
if [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
13-
/usr/lib/systemd/systemd-update-helper system-reload-restart mac-api.service || :
13+
/usr/lib/systemd/systemd-update-helper mark-restart-system-units mac-api.service || :
14+
/usr/lib/systemd/systemd-update-helper system-reload-restart || :
1415
fi
1516
}
1617

service/service.service

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ RestartSec=15
1515

1616
ExecStart=/usr/bin/mac-api
1717

18+
# Make sure config file exists
19+
ExecStartPre=+/bin/mkdir -p /etc/mac-api
20+
ExecStartPre=+/bin/chown root:mac-api /etc/mac-api
1821
# Make sure log directory exists
1922
ExecStartPre=+/bin/mkdir -p /var/log/mac-api
2023
ExecStartPre=+/bin/chown mac-api:mac-api /var/log/mac-api

0 commit comments

Comments
 (0)