Skip to content

Commit

Permalink
Fix permissions on PID/LOG File
Browse files Browse the repository at this point in the history
Fixes Issue 3 in filiparag#21
carstencodes authored Dec 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent ce69db6 commit 4ff932c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions hetzner_ddns.openwrt.rc
Original file line number Diff line number Diff line change
@@ -4,7 +4,22 @@
START=99
USE_PROCD=1

_LOG_FILE=/var/log/hetzner_ddns.log
_PID_FILE=/var/run/hetzner_ddns.pid

fix_permissions() {
touch "${_LOG_FILE}"
touch "${_PID_FILE}"

chown nobody:nogroup "${_LOG_FILE}"
chown nobody:nogroup "${_PID_FILE}"

chmod u+w "${_LOG_FILE}"
chmod u+w "${_PID_FILE}"
}

start_service() {
fix_permissions
procd_open_instance [hetzner_ddns]
procd_set_param command /usr/bin/hetzner_ddns -d /etc/config/hetzner_ddns.conf

0 comments on commit 4ff932c

Please sign in to comment.