post_install() { post_upgrade } post_upgrade() { echo "ATTENTION WWWOFFLE:" echo "-------------------" echo "" echo "Configuration file template is installed at" echo " /etc/wwwoffle/wwwoffle.conf.template" echo "" echo "Copy it to /etc/wwwoffle/wwwoffle.conf and edit it to your needs" echo "in order to make wwwoffle work." echo "" echo "-------------------" echo "" echo "init-scripts were installed for:" echo " * sysvinit ('/etc/rc.d/wwwoffle')," echo " * openrc ('/etc/init.d/wwwoffle') and" echo " * systemd ('/usr/lib/systemd/system/wwwoffle.service')." echo "Which one will be used depends on your init system you use." echo "" echo "Also, if you want to run wwwoffled at boot, you need to enable the" echo "service the way it is applicable for your initsystem. By default" echo "it won't be launched at bootup." echo "" echo "-------------------" echo "" echo "In order to define the options passed to wwwoffle during startup" echo "(including which configuration file to use), edit" echo " * the file '/etc/conf.d/wwwoffle' when using" echo " - sysvinit or" echo " - openrc," echo " * the file '/usr/lib/systemd/system/wwwoffle.service' when using" echo " systemd." echo "" echo "-------------------" echo "" echo "Set bind-ipv4 = none in wwwoffle.conf if you get ipv4 related warnings." echo "" echo "-------------------" if [ ! `grep -E '^wwwoffle\:' /etc/group` ]; then echo ">>> Adding group wwwoffle." groupadd wwwoffle &> /dev/null fi if [ ! `grep -E '^wwwoffle\:' /etc/passwd` ]; then id wwwoffle &> /dev/null || \ echo ">>> Adding user wwwoffle." useradd -g wwwoffle wwwoffle fi chown -R wwwoffle:wwwoffle /var/spool/wwwoffle } pre_remove() { echo ">>> Removing user wwwoffle." userdel wwwoffle &> /dev/null echo ">>> Removing group wwwoffle." groupdel wwwoffle &> /dev/null } op=$1 shift $op $*