mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 02:30:31 +00:00
Normalise existing yggdrasil.conf on debian package install/upgrade
This commit is contained in:
parent
34f7b7ca14
commit
8a46253c1f
@ -54,11 +54,17 @@ cat > /tmp/$PKGNAME/debian/docs << EOF
|
||||
Please see https://github.com/Arceliar/yggdrasil-go/
|
||||
EOF
|
||||
cat > /tmp/$PKGNAME/debian/install << EOF
|
||||
usr/bin/yggdrasil usr/bin/yggdrasilctl usr/bin
|
||||
usr/bin/yggdrasil usr/bin
|
||||
usr/bin/yggdrasilctl usr/bin
|
||||
etc/systemd/system/*.service etc/systemd/system
|
||||
EOF
|
||||
cat > /tmp/$PKGNAME/debian/postinst << EOF
|
||||
#!/bin/sh
|
||||
if [ -f /etc/yggdrasil.conf ];
|
||||
then
|
||||
cp /etc/yggdrasil.conf /etc/yggdrasil.conf.pre-upgrade
|
||||
./yggdrasil -useconffile /etc/yggdrasil.conf.pre-upgrade -normaliseconf > /etc/yggdrasil.conf;
|
||||
fi
|
||||
systemctl enable yggdrasil
|
||||
systemctl start yggdrasil
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user