diff --git a/bashclub-zsync/DEBIAN/postinst b/bashclub-zsync/DEBIAN/postinst index 462ce34..b8e5019 100644 --- a/bashclub-zsync/DEBIAN/postinst +++ b/bashclub-zsync/DEBIAN/postinst @@ -1,5 +1,7 @@ #!/bin/bash +PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" + if [ ! -d /var/log/bashclub-zsync ]; then mkdir -p /var/log/bashclub-zsync fi \ No newline at end of file diff --git a/bashclub-zsync/DEBIAN/preinst b/bashclub-zsync/DEBIAN/preinst index cc1f786..6972d2d 100644 --- a/bashclub-zsync/DEBIAN/preinst +++ b/bashclub-zsync/DEBIAN/preinst @@ -1 +1,12 @@ -#!/bin/bash \ No newline at end of file +#!/bin/bash + +PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" + +# check if script is installed manually on system and rename an remove execute flag +if ! dpkg -l bashclub-zsync > /dev/null 2>&1; then + if which bashclub-zsync > /dev/null 2>&1; then + zsync=$(which bashclub-zsync) + mv ${zsync} ${zsync}.legacy + chmod -x ${zsync}.legacy + fi +fi \ No newline at end of file