PKGBUILDs/community/sabnzbd/sabnzbd.install
2010-09-14 04:47:33 +00:00

24 lines
805 B
Text

## arg 1: the new package version
post_install() {
# add x-nzb mimetype
xdg-mime install --mode system /opt/sabnzbd/x-nzb.xml
groupadd sabnzbd &> /dev/null
useradd -g sabnzbd -d /opt/sabnzbd -s /bin/false sabnzbd &> /dev/null
chown -R sabnzbd:sabnzbd /opt/sabnzbd
echo " >> Don't forget to edit /etc/conf.d/sabnzbd!"
echo " >> Add your Session key and if necessary your username and password to ensure a proper shutdown."
echo " >> "
echo " >> If you want to associate .nzb-files with SABnzbd, run 'xdg-mime default sabnzbd.desktop applications/x-nzb'"
}
## arg 1: the new package version
## arg 2: the old package version
post_upgrade() {
chown -R sabnzbd:sabnzbd /opt/sabnzbd
}
## arg 1: the old package version
pre_remove() {
userdel sabnzbd &> /dev/null
}