summarylogtreecommitdiffstats
path: root/amule.install
diff options
context:
space:
mode:
authormaz-12015-10-08 04:40:15 +0800
committermaz-12015-10-08 04:40:15 +0800
commitb14389e644ca7f4fe58e61c82315c0fc0aaff772 (patch)
tree800ada4bea5d8478dd238283b26f30a0e44f803e /amule.install
downloadaur-b14389e644ca7f4fe58e61c82315c0fc0aaff772.tar.gz
initial
Diffstat (limited to 'amule.install')
-rw-r--r--amule.install29
1 files changed, 29 insertions, 0 deletions
diff --git a/amule.install b/amule.install
new file mode 100644
index 000000000000..62dab1173f33
--- /dev/null
+++ b/amule.install
@@ -0,0 +1,29 @@
+post_install() {
+ post_upgrade
+ passwd -l amule &>/dev/null
+}
+
+_config_instructions() {
+ echo "If you plan to use external client (e.g. amuleGUI or amuleweb) then you need to"
+ echo "provide [ExternalConnect] configuration."
+ echo "You also need to specify amuleweb password."
+ echo "Please follow https://wiki.archlinux.org/index.php/AMule for more information."
+ echo "amuleweb can be started as 'systemctl start amuleweb'."
+}
+
+post_upgrade() {
+ # create user/group that the daemon will run as by default, do not delete this on uninstall, as it will own files
+ getent group amule >/dev/null || groupadd amule
+ getent passwd amule >/dev/null || useradd -c 'aMule Client' -g amule -d '/var/lib/amule' -m -s /bin/false amule
+
+ if [ ! -e /var/lib/amule/.aMule/amule.conf ]; then
+ _config_instructions
+ fi
+}
+
+post_remove() {
+ # TOTHINK: delete homedir and user account/group?
+ #getent passwd amule >/dev/null && userdel amule
+ #getent group amule >/dev/null && groupdel amule
+ true
+}