mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
58 lines
1.6 KiB
Text
58 lines
1.6 KiB
Text
post_install() {
|
|
echo -n "adding slimserver user... "
|
|
useradd -c "SlimServer" -g users -s /bin/false slimserver && echo "done."
|
|
passwd -l slimserver &>/dev/null
|
|
|
|
chown -R slimserver:users /home/slimserver
|
|
|
|
install -o slimserver -d /var/cache/slimserver
|
|
touch /var/log/slimserver.log
|
|
chown slimserver:users /var/log/slimserver.log
|
|
|
|
cat << 'EOM'
|
|
|
|
==> Slimserver >= 6.5.0 uses MySQL instead of sqlite. This package is
|
|
==> intended for use with a separate MySQL instance, and should be configured
|
|
==> as described here:
|
|
==> http://wiki.slimdevices.com/index.cgi?ExistingMySQLInstance
|
|
|
|
==> PLEASE NOTE: SlimServer should always be run as the user 'slimserver'
|
|
==> This is easily done by adding slimserver to the DAEMONS array in rc.conf,
|
|
==> after network and mysql.
|
|
|
|
==> Additional run-time options can be added to /etc/conf.d/slimserver.
|
|
==> Please refer to "/home/slimserver/slimserver.pl --help" for full details.
|
|
|
|
EOM
|
|
}
|
|
|
|
post_upgrade() {
|
|
chown -R slimserver:users /home/slimserver
|
|
|
|
cat << 'EOM'
|
|
|
|
==> Slimserver >= 6.5.0 uses MySQL instead of sqlite. This package is
|
|
==> intended for use with a separate MySQL instance, and should be configured
|
|
==> as described here:
|
|
==> http://wiki.slimdevices.com/index.cgi?ExistingMySQLInstance
|
|
|
|
EOM
|
|
}
|
|
|
|
pre_remove() {
|
|
# pre_remove gets called whenever post_remove is defined.
|
|
true
|
|
}
|
|
|
|
post_remove() {
|
|
# post_remove doesn't start at a newline like the other post_* functions,
|
|
# so we'll have to make one for ourselves.
|
|
echo -n -e "\nremoving slimserver user... "
|
|
userdel slimserver && echo "done."
|
|
|
|
rm -r /var/cache/slimserver /var/log/slimserver.log
|
|
}
|
|
|
|
op=$1
|
|
shift
|
|
$op $*
|