summarylogtreecommitdiffstats
path: root/wwwoffle.install
diff options
context:
space:
mode:
authorfelics@felics-tablet2016-02-01 14:17:17 +0100
committerfelics@felics-tablet2016-02-01 14:17:17 +0100
commit67a95a7eb3e4cd65f2ec61fcd0b0f6ad9b57a602 (patch)
tree031f09bfddb744c1b6a1c3d3159f9f49c37d1870 /wwwoffle.install
downloadaur-67a95a7eb3e4cd65f2ec61fcd0b0f6ad9b57a602.tar.gz
Initial commit.
Diffstat (limited to 'wwwoffle.install')
-rw-r--r--wwwoffle.install40
1 files changed, 40 insertions, 0 deletions
diff --git a/wwwoffle.install b/wwwoffle.install
new file mode 100644
index 000000000000..80626e6d5310
--- /dev/null
+++ b/wwwoffle.install
@@ -0,0 +1,40 @@
+post_install() {
+ post_upgrade
+}
+
+post_upgrade() {
+ echo "ATTENTION WWWOFFLE:"
+ 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 "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 sysvinit or openrc,"
+ echo " * the file '/usr/lib/systemd/system/wwwoffle.service' when using"
+ echo " systemd."
+ echo "-------------------"
+ echo "Set bind-ipv4 = none in wwwoffle.conf if you get ipv4 related warnings."
+ echo "-------------------"
+ if [ ! `grep wwwoffle /etc/group` ]; then
+ echo ">>> Adding group wwwoffle."
+ groupadd wwwoffle &> /dev/null;
+ fi
+ id wwwoffle &> /dev/null || \
+ (echo ">>> Adding user wwwoffle." && useradd -g wwwoffle wwwoffle)
+ chown -R wwwoffle:wwwoffle /var/spool/wwwoffle /etc/wwwoffle
+}
+
+pre_remove() {
+ echo ">>> Removing user wwwoffle."
+ userdel wwwoffle &> /dev/null
+ echo ">>> Removing group wwwoffle."
+ groupdel wwwoffle &> /dev/null
+}
+
+op=$1
+shift
+$op $*