1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps.git synced 2025-03-09 15:50:00 +00:00

Check if user is root, fix error in omr-service

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-08-14 08:18:13 +00:00
parent b2cddfca38
commit fd11069012
2 changed files with 4 additions and 2 deletions

View file

@ -56,6 +56,8 @@ export LC_ALL=C
export PATH=$PATH:/sbin
export DEBIAN_FRONTEND=noninteractive
if [ "$(id -u)" -ne 0 ]; then echo 'Please run as root.' >&2; exit 1; fi
# Check Linux version
if test -f /etc/os-release ; then
. /etc/os-release
@ -132,7 +134,7 @@ if [ "$ID" = "debian" ] && [ "$VERSION_ID" = "9" ] && [ "$UPDATE_OS" = "yes" ];
VERSION_ID="10"
fi
if [ "$ID" = "ubuntu" ] && [ "$VERSION_ID" = "18.04" ] && [ "$UPDATE_OS" = "yes" ]; then
echo "Update Ubutnu 18.04 to Ubuntu 20.04"
echo "Update Ubuntu 18.04 to Ubuntu 20.04"
apt-get -y -f --force-yes upgrade
apt-get -y -f --force-yes dist-upgrade
sed -i 's:bionic:focal:g' /etc/apt/sources.list