summaryrefslogtreecommitdiff
path: root/extra/amule/amule.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/amule/amule.install')
-rw-r--r--extra/amule/amule.install34
1 files changed, 0 insertions, 34 deletions
diff --git a/extra/amule/amule.install b/extra/amule/amule.install
deleted file mode 100644
index 397f68bf2..000000000
--- a/extra/amule/amule.install
+++ /dev/null
@@ -1,34 +0,0 @@
-post_install() {
- post_upgrade
- passwd -l amule &>/dev/null
-
- # Generate a random password for amuled<->amuleweb communication
- ec_password=$(tr -cd '[:alnum:]' < /dev/urandom | fold -w30 | head -n1)
- encripted_ec_password=$(echo -n $ec_password | md5sum | cut -d ' ' -f 1)
- # Create a config file
- sudo -u amule mkdir -p /var/lib/amule/.aMule
- echo "[ExternalConnect]
-AcceptExternalConnections=1
-ECPassword=$encripted_ec_password" > /var/lib/amule/.aMule/amule.conf
-
- sudo -u amule /usr/bin/amuleweb --write-config --password=$ec_password --admin-pass=amule
-
- echo "A new password for extarnal configuration is generated: $ec_password"
- echo "Please follow https://wiki.archlinux.org/index.php/AMule how to setup"
- echo "external connection (e.g. using amule-gui tool)."
- echo "amuleweb can be started as 'systemctl start amuleweb'."
- echo "Password for amuleweb: amule"
-}
-
-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 -b '/var/lib' -m -s /bin/false amule
-}
-
-post_remove(){
- /usr/bin/systemctl stop amuled.service amuleweb.service
-
- getent passwd amule >/dev/null && userdel amule
- getent group amule >/dev/null && groupdel amule
-}