aboutsummaryrefslogtreecommitdiffstats
path: root/community/zoneminder/zoneminder.initd
diff options
context:
space:
mode:
Diffstat (limited to 'community/zoneminder/zoneminder.initd')
-rw-r--r--community/zoneminder/zoneminder.initd28
1 files changed, 4 insertions, 24 deletions
diff --git a/community/zoneminder/zoneminder.initd b/community/zoneminder/zoneminder.initd
index 1c8b970883..ec9a1d1029 100644
--- a/community/zoneminder/zoneminder.initd
+++ b/community/zoneminder/zoneminder.initd
@@ -1,11 +1,11 @@
#!/sbin/openrc-run
# init.d file for zoneminder
-# Copyright (c) 2013-2016 Kaarle Ritvanen
+# Copyright (c) 2013-2017 Kaarle Ritvanen
name=zoneminder
command=/usr/bin/zmpkg.pl
-extra_commands="setup perms"
+extra_commands="setup"
depend() {
after mariadb
@@ -16,8 +16,8 @@ start() {
if status > /dev/null; then
ewarn "$name already started"
else
- prepare
- $command start
+ ( . /etc/zm.conf && chgrp $ZM_WEB_GROUP /etc/zm.conf )
+ zmlinkcontent.sh > /dev/null && $command start
fi
eend $?
}
@@ -45,23 +45,3 @@ setup() {
< $ZM_PATH_DATA/db/zm_create.sql
eend $?
}
-
-prepare() {
- . /etc/zm.conf
- install -d -o $ZM_WEB_USER -g $ZM_WEB_GROUP \
- /var/run/zoneminder
- perms simple
-}
-
-perms() {
- . /etc/zm.conf
- if [ "$1" != "simple" ]; then
- ebegin "Setting correct permssion, this could take a while"
- RECURSIVE="-R"
- fi
- chgrp $ZM_WEB_GROUP /etc/zm.conf
- chown $RECURSIVE $ZM_WEB_USER:$ZM_WEB_GROUP \
- /var/lib/zoneminder/* /var/run/zoneminder
- chown $RECURSIVE $ZM_WEB_USER:wheel /var/log/zoneminder
-}
-