mirror of
https://github.com/Unimatrix0/update_ombi.git
synced 2025-08-20 21:34:04 -07:00
Fix for ombi not starting when script run as root
This commit is contained in:
parent
d1a4120578
commit
dacf2f5fd7
1 changed files with 4 additions and 2 deletions
|
@ -147,6 +147,7 @@ if [ "`systemctl is-active $ombiservicename`" == "active" ]; then
|
||||||
if [ $? -ne 0 ] || [ "`systemctl is-active $ombiservicename`" == "active" ] ; then
|
if [ $? -ne 0 ] || [ "`systemctl is-active $ombiservicename`" == "active" ] ; then
|
||||||
if [ $i -lt $j ]; then
|
if [ $i -lt $j ]; then
|
||||||
.log 3 "Failed to stop Ombi...[attempt $i of $j]"
|
.log 3 "Failed to stop Ombi...[attempt $i of $j]"
|
||||||
|
sleep 1
|
||||||
else
|
else
|
||||||
.log 2 "Failed to stop Ombi...[attempt $i of $j]...Bailing!"
|
.log 2 "Failed to stop Ombi...[attempt $i of $j]...Bailing!"
|
||||||
exit 2
|
exit 2
|
||||||
|
@ -176,13 +177,14 @@ if [ $running -eq 1 ]; then
|
||||||
while [ $i -le $j ]
|
while [ $i -le $j ]
|
||||||
do
|
do
|
||||||
if [ $scriptuser = "root" ]; then
|
if [ $scriptuser = "root" ]; then
|
||||||
systemctl systemctl start $ombiservicename.service > /dev/null 2>&1
|
systemctl start $ombiservicename.service > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
sudo systemctl start $ombiservicename.service > /dev/null 2>&1
|
sudo systemctl start $ombiservicename.service > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
if [ $? -ne 0 ] || [ "`systemctl is-active $ombiservicename`" != "active" ] ; then
|
if [ $? -ne 0 ] || [ "`systemctl is-active $ombiservicename`" != "active" ] ; then
|
||||||
if [ $i -lt $j ]; then
|
if [ $i -lt $j ]; then
|
||||||
.log 3 "Failed to start Ombi...[attempt $i of $j]"
|
.log 3 "Failed to start Ombi...[attempt $i of $j]"
|
||||||
|
sleep 1
|
||||||
else
|
else
|
||||||
.log 2 "Failed to start Ombi...[attempt $i of $j]...Bailing!"
|
.log 2 "Failed to start Ombi...[attempt $i of $j]...Bailing!"
|
||||||
exit 3
|
exit 3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue