Skip to content

Commit

Permalink
Fix for ombi not starting when script run as root
Browse files Browse the repository at this point in the history
  • Loading branch information
Unimatrix0 committed Nov 4, 2017
1 parent d1a4120 commit dacf2f5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions update_ombi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ if [ "`systemctl is-active $ombiservicename`" == "active" ]; then
if [ $? -ne 0 ] || [ "`systemctl is-active $ombiservicename`" == "active" ] ; then
if [ $i -lt $j ]; then
.log 3 "Failed to stop Ombi...[attempt $i of $j]"
sleep 1
else
.log 2 "Failed to stop Ombi...[attempt $i of $j]...Bailing!"
exit 2
Expand Down Expand Up @@ -176,13 +177,14 @@ if [ $running -eq 1 ]; then
while [ $i -le $j ]
do
if [ $scriptuser = "root" ]; then
systemctl systemctl start $ombiservicename.service > /dev/null 2>&1
systemctl start $ombiservicename.service > /dev/null 2>&1
else
sudo systemctl start $ombiservicename.service > /dev/null 2>&1
fi
fi
if [ $? -ne 0 ] || [ "`systemctl is-active $ombiservicename`" != "active" ] ; then
if [ $i -lt $j ]; then
.log 3 "Failed to start Ombi...[attempt $i of $j]"
sleep 1
else
.log 2 "Failed to start Ombi...[attempt $i of $j]...Bailing!"
exit 3
Expand Down

0 comments on commit dacf2f5

Please sign in to comment.