siproxd: clean up directory permissions, ownership
authorguidosarducci <guidosarducci@users.noreply.github.com>
Sun, 18 Jun 2017 23:53:21 +0000 (16:53 -0700)
committerguidosarducci <guidosarducci@users.noreply.github.com>
Sun, 18 Mar 2018 10:37:51 +0000 (03:37 -0700)
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
net/siproxd/files/siproxd.init

index 46c0119bc53ae3a5d508e0ec2565159c0d5e53a9..b175598c577cdd22683baa5ddfe569614814f2c6 100644 (file)
@@ -230,13 +230,16 @@ stop_instance() {
 }
 
 start() {
-       mkdir -m 0755 -p "$siproxd_conf_dir"
-       mkdir -m 0755 -p "$siproxd_registration_dir"
-       [ -d "$siproxd_pid_dir" ] || {
-               mkdir -m 0755 -p "$siproxd_pid_dir"
-               chmod 0750 "$siproxd_pid_dir"
-               chown nobody:nogroup "$siproxd_pid_dir"
-       }
+       mkdir -p "$siproxd_conf_dir"
+       chmod 755 "$siproxd_conf_dir"
+
+       mkdir -p "$siproxd_registration_dir"
+       chmod 700 "$siproxd_registration_dir"
+       chown nobody:nogroup "$siproxd_registration_dir"
+
+       mkdir -p "$siproxd_pid_dir"
+       chmod 700 "$siproxd_pid_dir"
+       chown nobody:nogroup "$siproxd_pid_dir"
 
        include /lib/network
        . /lib/functions/network.sh