diff options
Diffstat (limited to 'main/zoneminder/zoneminder.initd')
-rw-r--r-- | main/zoneminder/zoneminder.initd | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/main/zoneminder/zoneminder.initd b/main/zoneminder/zoneminder.initd index bfb32318dc..0cecd48010 100644 --- a/main/zoneminder/zoneminder.initd +++ b/main/zoneminder/zoneminder.initd @@ -5,7 +5,7 @@ name=zoneminder command=/usr/bin/zmpkg.pl -extra_commands="setup perms" +extra_commands="setup" depend() { after mysql @@ -16,7 +16,7 @@ start() { if status > /dev/null; then ewarn "$name already started" else - mkrundir + prepare $command start fi eend $? @@ -46,15 +46,11 @@ setup() { eend $? } -perms() { - . /etc/zm.conf - ebegin "Setting correct permissions" - chown -R $ZM_WEB_USER:$ZM_WEB_GROUP \ - /var/*/zoneminder -} - -mkrundir() { +prepare() { . /etc/zm.conf install -d -o $ZM_WEB_USER -g $ZM_WEB_GROUP \ /var/run/zoneminder + chown $ZM_WEB_USER:$ZM_WEB_GROUP \ + /var/lib/zoneminder/* \ + /var/log/zoneminder } |