Improve the update script to use the owner of the git repo
This commit is contained in:
@@ -17,10 +17,12 @@ echo "<!-- UPDATING ---!>"
|
|||||||
# Stop any running service
|
# Stop any running service
|
||||||
systemctl stop RadioNode
|
systemctl stop RadioNode
|
||||||
|
|
||||||
# Update the git Repo
|
# Get the owner of the current working directory
|
||||||
installUser=$(cat ./config/installerName)
|
cwd_owner=$(stat -c '%U' .)
|
||||||
sudo su -l $installUser -c 'git fetch -a -p'
|
|
||||||
sudo su -l $installUser -c 'git pull'
|
# Update the git Repo as the owner of the current working directory
|
||||||
|
sudo su -l $cwd_owner -c 'git fetch'
|
||||||
|
sudo su -l $cwd_owner -c 'git pull'
|
||||||
|
|
||||||
# Install any new libraries
|
# Install any new libraries
|
||||||
npm i
|
npm i
|
||||||
|
|||||||
Reference in New Issue
Block a user