Resolve "Mistborn and wireguard fail after restart and nextcloud"
This commit is contained in:
Vendored
+13
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
#### ENV file
|
||||
|
||||
VAR_FILE=/opt/mistborn/.env
|
||||
|
||||
source /opt/mistborn/scripts/subinstallers/platform.sh
|
||||
@@ -19,3 +21,14 @@ if [ "$GIT_BRANCH" != "master" ]; then
|
||||
fi
|
||||
|
||||
echo "MISTBORN_TAG=$MISTBORN_TAG" | sudo tee -a ${VAR_FILE}
|
||||
|
||||
#### install and base services
|
||||
iface=$(ip -o -4 route show to default | egrep -o 'dev [^ ]*' | awk 'NR==1{print $2}')
|
||||
|
||||
# default interface
|
||||
sudo cp /opt/mistborn/scripts/services/Mistborn* /etc/systemd/system/
|
||||
sudo find /etc/systemd/system/ -type f -name 'Mistborn*' | xargs sudo sed -i "s/User=root/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/"
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
Reference in New Issue
Block a user