diff options
author | jaap aarts | 2017-09-15 16:47:03 +0200 |
---|---|---|
committer | jaap aarts | 2018-03-18 15:04:16 +0100 |
commit | 435243d3345a2b25856e645be357f978ba91985d (patch) | |
tree | a2898066a1be992474b068cda6cb53349acff803 | |
parent | 4dc6e52acaa7f62981a37cd73a3bdf76f9dc5001 (diff) | |
download | aur-435243d3345a2b25856e645be357f978ba91985d.tar.gz |
\sept-13-2017/ 2.0.0beta4.b786 might have fixed issue with incorrect syntax and debian only commands
-rw-r--r-- | synergy2-bin.install | 34 |
1 files changed, 6 insertions, 28 deletions
diff --git a/synergy2-bin.install b/synergy2-bin.install index bf0e8443fa67..e4f4a49d54a8 100644 --- a/synergy2-bin.install +++ b/synergy2-bin.install @@ -3,27 +3,12 @@ post_install() { chmod 777 /var/lib/synergy chmod 777 /etc/synergy xdg-icon-resource forceupdate --theme hicolor &> /dev/null - # This will only remove masks created by d-s-h on package removal. - deb-systemd-helper unmask synergy.service >/dev/null || true - - # was-enabled defaults to true, so new installations run enable. - if deb-systemd-helper --quiet was-enabled synergy.service; then - # Enables the unit on first installation, creates new - # symlinks on upgrades if the unit file has changed. - deb-systemd-helper enable synergy.service >/dev/null || true - else - # Update the statefile to add new symlinks (if any), which need to be - # cleaned up on purge. Also remove old symlinks. - deb-systemd-helper update-state synergy.service >/dev/null || true - fi - if [ -x "/etc/init.d/synergy" ]; then - update-rc.d synergy defaults >/dev/null - invoke-rc.d synergy start || exit $? - fi - fi + + systemctl enable synergy.service >/dev/null || true + if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true - deb-systemd-invoke start synergy.service >/dev/null || true + systemctl start synergy.service >/dev/null || true fi if which update-icon-caches >/dev/null 2>&1 ; then update-icon-caches /usr/share/icons/synergy.svg @@ -43,10 +28,7 @@ pre_remove() { pre_remove() { if [ -d /run/systemd/system ]; then - deb-systemd-invoke stop synergy.service >/dev/null - fi - if [ -x "/etc/init.d/synergy" ]; then - invoke-rc.d synergy stop || exit $? + systemctl stop synergy.service >/dev/null fi } @@ -58,11 +40,7 @@ post_remove() { if [ -d /run/systemd/system ]; then systemctl --system daemon-reload >/dev/null || true fi - if [ "$1" = "purge" ] ; then - update-rc.d synergy remove >/dev/null - fi - - + # In case this system is running systemd, we make systemd reload the unit files # to pick up changes. if [ -d /run/systemd/system ] ; then |