PKGBUILDs/aur/sabnzbd/sabnzbd.install
2011-05-17 18:02:46 -04:00

26 lines
905 B
Plaintext

## arg 1: the new package version
post_install() {
# add x-nzb mimetype
xdg-mime install --mode system /opt/sabnzbd/x-nzb.xml
xdg-icon-resource install --context mimetypes --size 64 /opt/sabnzbd/nzb-2.png application-x-nzb
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
}