updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / icecast-svn / icecast.install
blob55479815d028670bc7f155c778fd1e2e8e9eb6fe
1 post_install() {
2         groupadd -g 400 icecast &>/dev/null
3         useradd -u 400 -g icecast -d /var/icecast -s /bin/false icecast &>/dev/null
5         mkdir -p /var/icecast/log
6         mkdir -p /var/icecast/etc
7         touch /var/icecast/log/error.log /var/icecast/log/access.log
8         chown -R icecast:icecast /var/icecast/log
9         cp -p /etc/{hosts,localtime,mime.types,resolv.conf} /var/icecast/etc/
10                 
11         echo "==> icecast: "
12         echo "==> icecast: Icecast is ready to be run chrooted in /var/icecast"
13         echo "==> icecast: "
14         echo "==> icecast: Edit icecast.xml"
15         echo "==> icecast: "
16         echo "==> icecast:  * CHANGE THE DEFAULT PASSWORDS FOR SOURCE CLIENTS, RELAYS AND"
17         echo "==> icecast:     THE ADMIN INTERFACE"
18         echo "==> icecast: "
19         echo "==> icecast: Add 'icecast' to DAEMONS in /etc/rc.conf if you want icecast at startup"
22 post_upgrade() {
23         cp -p /etc/{hosts,localtime,mime.types,resolv.conf} /var/icecast/etc/
26 pre_remove() {
27         usedel icecast &>/dev/null
28         chown -R root:root /var/icecast/log
29         rm -f /etc/icecast.xml
30         rm -f /etc/icecast/icecast.xml
33 post_remove() {
34         echo "==> icecast: "
35         echo "==> icecast: Directory /var/icecast remained after uninstallation."
36         echo "==> icecast: "