mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-14 03:20:28 +00:00
Fix debian normalisation in postinst
This commit is contained in:
parent
8456b2e1bc
commit
77d67a1569
@ -62,8 +62,11 @@ cat > /tmp/$PKGNAME/debian/postinst << EOF
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ -f /etc/yggdrasil.conf ];
|
if [ -f /etc/yggdrasil.conf ];
|
||||||
then
|
then
|
||||||
cp /etc/yggdrasil.conf /etc/yggdrasil.conf.pre-upgrade
|
mkdir -p /var/backups
|
||||||
./yggdrasil -useconffile /etc/yggdrasil.conf.pre-upgrade -normaliseconf > /etc/yggdrasil.conf;
|
echo "Backing up configuration file to /var/backups/yggdrasil.conf.`date +%Y%m%d`"
|
||||||
|
cp /etc/yggdrasil.conf /var/backups/yggdrasil.conf.`date +%Y%m%d`
|
||||||
|
echo "Normalising /etc/yggdrasil.conf"
|
||||||
|
/usr/bin/yggdrasil -useconffile /var/backups/yggdrasil.conf.`date +%Y%m%d` -normaliseconf > /etc/yggdrasil.conf
|
||||||
fi
|
fi
|
||||||
systemctl enable yggdrasil
|
systemctl enable yggdrasil
|
||||||
systemctl start yggdrasil
|
systemctl start yggdrasil
|
||||||
|
Loading…
Reference in New Issue
Block a user