From f2fb0532a8505ced989eb6265e8bd867096da8c4 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 29 Jan 2018 18:32:48 +0100 Subject: [PATCH] updated to 'pi' home directory --- sats-debug@.service | 6 ++++-- sats/main | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sats-debug@.service b/sats-debug@.service index ed87222..ef28234 100644 --- a/sats-debug@.service +++ b/sats-debug@.service @@ -6,8 +6,10 @@ Type=simple Restart=always User=pi Group=pi -ExecStartPre=/usr/bin/sudo -u sats git clone --recursive -b master ssh://smmp-server/satsd/debug /service/debug -ExecStart=/bin/bash /service/debug/sats/main %i +ExecStartPre=/usr/bin/sudo -u sats git clone --recursive -b master ssh://smmp-server/satsd/debug /home/pi/debug +ExecStartPre=/usr/bin/sudo chown -R pi:pi /home/pi/debug +ExecStartPre=/usr/bin/sudo chmod -R 750 /home/pi/debug +ExecStart=/bin/bash /home/pi/debug/sats/main %i ExecStop=/bin/sleep 10 [Install] diff --git a/sats/main b/sats/main index 15d89bd..515ad2b 100644 --- a/sats/main +++ b/sats/main @@ -10,7 +10,7 @@ ROOT=`dirname $ROOT`; test $# -lt 1 && echo -e "ERR: Missing argument\n\n\tSATS_ID\tThe id for the bash-socket\n" && exit 1; # (2) Create config dir (if doesn't exist) # -test ! -d $ROOT/config && sudo -u sats ( mkdir $ROOT/config; chown sats:pi $ROOT/config; chmod 770 $ROOT/config ); +test ! -d $ROOT/config && ( mkdir $ROOT/config; sudo chown sats:pi $ROOT/config; sudo chmod 770 $ROOT/config ); # (2) Start server in background (keep PID) #--------------------------------------------------------#