From b78108a1193009e5dd0db6fe3cfa13c9e749cf60 Mon Sep 17 00:00:00 2001 From: Denis Cardon Date: Wed, 29 Mar 2017 20:00:10 +0200 Subject: [PATCH] handle symlink better --- deb/createdeb.sh | 2 +- deb/postinst | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/deb/createdeb.sh b/deb/createdeb.sh index c54ec76..0eb3d8f 100755 --- a/deb/createdeb.sh +++ b/deb/createdeb.sh @@ -6,7 +6,7 @@ rm -Rf builddir mkdir builddir mkdir builddir/DEBIAN cp ./control ./builddir/DEBIAN -cp ./files/postinst ./builddir/DEBIAN +cp ./postinst ./builddir/DEBIAN sed "s/VERSION/$VERSION/" -i ./builddir/DEBIAN/control diff --git a/deb/postinst b/deb/postinst index 37aebbb..5b5be81 100755 --- a/deb/postinst +++ b/deb/postinst @@ -1,5 +1,7 @@ #!/bin/bash systemctl enable tisbackup_huey systemctl enable tisbackup_gui -ln -s /opt/tisbackup/tisbackup.py /usr/bin/tisbackup +if [ ! -f /usr/bin/tisbackup ]; then + ln -s /opt/tisbackup/tisbackup.py /usr/bin/tisbackup +fi