1
0
forked from extern/zsync
zsync/bashclub-zsync/DEBIAN/preinst
2024-08-14 11:53:49 +00:00

17 lines
574 B
Bash
Executable 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
if [ -f /etc/bashclub/zsync.conf ] && [ ! -f /etc/bashclub/zsync.conf.backup_$(date +%Y-%m-%d) ] ; then
cp /etc/bashclub/zsync.conf /etc/bashclub/zsync.conf.backup_$(date +%Y-%m-%d)
fi