Browse Source

removing multi-user

merge-requests/1/head
Steven Foerster 6 years ago
parent
commit
49314cefea
  1. 10
      scripts/install.sh

10
scripts/install.sh

@ -145,7 +145,7 @@ iface=$(ip -o -4 route show to default | egrep -o 'dev [^ ]*' | awk '{print $2}' @@ -145,7 +145,7 @@ iface=$(ip -o -4 route show to default | egrep -o 'dev [^ ]*' | awk '{print $2}'
IPV4_PUBLIC=$(ip -o -4 route show default | egrep -o 'dev [^ ]*' | awk '{print $2}' | xargs ip -4 addr show | grep 'inet ' | awk '{print $2}' | grep -o "^[0-9.]*" | tr -cd '\11\12\15\40-\176' | head -1) # tail -1 to get last
# clean
if [ -f "/etc/systemd/system/multi-user.target.wants/Mistborn-base.service" ]; then
if [ -f "/etc/systemd/system/Mistborn-base.service" ]; then
sudo systemctl stop Mistborn*.service 2>/dev/null || true
sudo systemctl disable Mistborn*.service 2>/dev/null || true
fi
@ -171,10 +171,10 @@ sudo systemctl restart unattended-upgrades @@ -171,10 +171,10 @@ sudo systemctl restart unattended-upgrades
# install and start base services
# default interface
sudo cp ./scripts/services/Mistborn* /etc/systemd/system/multi-user.target.wants/
sudo find /etc/systemd/system/multi-user.target.wants/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/User=.*/User=$USER/"
sudo find /etc/systemd/system/multi-user.target.wants/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/ root:root / $USER:$USER /"
sudo find /etc/systemd/system/multi-user.target.wants/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/DIFACE/$iface/"
sudo cp ./scripts/services/Mistborn* /etc/systemd/system/
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/User=.*/User=$USER/"
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/ root:root / $USER:$USER /"
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/DIFACE/$iface/"
if [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "raspbian" ]; then
# remove systemd-resolved lines

Loading…
Cancel
Save