Skip to content

Commit

Permalink
wireguard: fix missing resolvconf
Browse files Browse the repository at this point in the history
  • Loading branch information
outdoorbits committed Jan 14, 2024
1 parent 8492979 commit 74a8768
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion install-little-backup-box.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ sudo DEBIAN_FRONTEND=noninteractive \
-o "Dpkg::Options::=--force-confold" \
-o "Dpkg::Options::=--force-confdef" \
install -y -q --allow-downgrades --allow-remove-essential --allow-change-held-packages \
acl git screen rsync exfat-fuse exfatprogs ntfs-3g acl bindfs gphoto2 libimage-exiftool-perl php php-cli samba samba-common-bin vsftpd imagemagick curl dos2unix libimobiledevice6 ifuse sshpass apache2 apache2-utils libapache2-mod-php bc f3 sqlite3 php-sqlite3 ffmpeg libheif-examples libraw-bin openvpn wireguard hfsprogs fuse3 python3 python3-pip python3-pil python3-configobj python3-gpiozero python3-qrcode
acl git screen rsync exfat-fuse exfatprogs ntfs-3g acl bindfs gphoto2 libimage-exiftool-perl php php-cli samba samba-common-bin vsftpd imagemagick curl dos2unix libimobiledevice6 ifuse sshpass apache2 apache2-utils libapache2-mod-php bc f3 sqlite3 php-sqlite3 ffmpeg libheif-examples libraw-bin openvpn wireguard resolvconf hfsprogs fuse3 python3 python3-pip python3-pil python3-configobj python3-gpiozero python3-qrcode

# Remove packages not needed anymore
if [ "${SCRIPT_MODE}" = "update" ]; then
Expand All @@ -167,8 +167,12 @@ sudo DEBIAN_FRONTEND=noninteractive \
apt autoremove -y

# disable services
sudo systemctl disable resolvconf
sudo systemctl disable openvpn.service

# remove resolvconf config
sudo rm /etc/resolvconf/resolv.conf.d/*

# Clone Little Backup Box
echo "Cloning Little Backup Box"
cd
Expand Down
2 changes: 2 additions & 0 deletions scripts/lib_vpn.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@ def start(self):

if self.VPNMode == 'OpenVPN':
Command = ['sudo','bash','-c','openvpn','--config',f"{self.__VPN_Dir}/{self.__VPN_FileName}"]
self.__log.message(' '.join(Command),3)
subprocess.Popen(Command,stdout=subprocess.DEVNULL, stdin=subprocess.DEVNULL)
elif self.VPNMode == 'WireGuard':
Command = ['sudo','wg-quick','up',f"{self.__VPN_Dir}/{self.__VPN_FileName}"]
self.__log.message(' '.join(Command),3)
subprocess.run(Command)

VPN_TimeoutTime = lib_system.get_uptime_sec() + self.__conf_VPN_TIMEOUT
Expand Down

0 comments on commit 74a8768

Please sign in to comment.