1 ## arg 1: the new package version
4 if grep -q "^sickbeard" /etc/group &> /dev/null ; then
5 groupmod -n sickbeard sickbeard &> /dev/null
7 groupadd -r sickbeard &> /dev/null
9 if grep -q "^sickbeard:" /etc/passwd 2> /dev/null ; then
10 usermod -s /bin/false -c "Sickbeard user" -d /opt/sickbeard -g sickbeard sickbeard &> /dev/null
12 useradd -s /bin/false -c "Sickbeard user" -d /opt/sickbeard -g sickbeard -r sickbeard &> /dev/null
15 groupadd sickbeard &> /dev/null
16 useradd -g sickbeard -d /opt/sickbeard -s /bin/false sickbeard &> /dev/null
17 chown -R sickbeard:sickbeard /opt/sickbeard
18 echo " >> If you change Sick Beard's port in the general configuration page, you will need to edit /etc/rc.d/sickbeard to have it point to the new port number"
19 sed -i 's/^if isinstance(sys.version_info, tuple):$/if isinstance(sys.version_info[:], tuple):/g' "/usr/lib/python2.7/site-packages/Cheetah/Template.py"
20 sed -i 's/python/python2/g' "${pkgdir}/opt/sickbeard/autoProcessTV/sabToSickBeard.py"
21 sed -i 's/python/python2/g' "${pkgdir}/opt/sickbeard/autoProcessTV/hellaToSickBeard.py"
23 ## arg 1: the new package version
24 ## arg 2: the old package version
26 chown -R sickbeard:sickbeard /opt/sickbeard
27 sed -i 's/^if isinstance(sys.version_info, tuple):$/if isinstance(sys.version_info[:], tuple):/g' "/usr/lib/python2.7/site-packages/Cheetah/Template.py"
28 sed -i 's/python/python2/g' "${pkgdir}/opt/sickbeard/autoProcessTV/sabToSickBeard.py"
29 sed -i 's/python/python2/g' "${pkgdir}/opt/sickbeard/autoProcessTV/hellaToSickBeard.py"
32 ## arg 1: the old package version
34 userdel sickbeard &> /dev/null