From 298d46904659775fc8dd5abe42256b5d6622619a Mon Sep 17 00:00:00 2001 From: src386 Date: Thu, 10 Sep 2015 16:37:25 +0200 Subject: [PATCH] systemd script moved to /etc/systemd/system --- TODO | 4 +--- scripts/install | 2 +- scripts/remove | 4 ++-- scripts/upgrade | 3 ++- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/TODO b/TODO index d217700..5fd1c30 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,2 @@ -- Check if Yes and yes are both working -- Sysvinit script syslog -- Log to /var/log/movim/ +- systemd Log to /var/log/movim/ - write systemd service to /etc/systemd/system diff --git a/scripts/install b/scripts/install index 1017c46..d4afd69 100644 --- a/scripts/install +++ b/scripts/install @@ -106,7 +106,7 @@ sudo sed -i "s@YHPORT@$port@g" ../conf/movim.{service,init} initcheck=`pgrep -ox systemd` if [ "$initcheck" = "1" ]; then - sudo cp ../conf/movim.service /lib/systemd/system/ + sudo cp ../conf/movim.service /etc/systemd/system/ sudo systemctl enable movim.service sudo systemctl start movim.service else diff --git a/scripts/remove b/scripts/remove index c1bd54d..6672861 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,8 +10,8 @@ sudo /etc/init.d/movim stop sudo systemctl stop movim.service sudo systemctl disable movim.service sudo update-rc.d -f movim remove -sudo rm /etc/init.d/movim -sudo rm /lib/systemd/system/movim.service +sudo rm -f /etc/init.d/movim +sudo rm -f /lib/systemd/system/movim.service #Drop database, movim files and user. mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" diff --git a/scripts/upgrade b/scripts/upgrade index ee2c1ca..4e65a3d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,7 +51,8 @@ sudo sed -i "s@YHPORT@$port@g" ../conf/movim.{service,init} initcheck=`pgrep -ox systemd` if [ "$initcheck" = "1" ]; then - sudo cp ../conf/movim.service /lib/systemd/system/ + sudo rm -f /lib/systemd/system/movim.service + sudo cp ../conf/movim.service /etc/systemd/system/ sudo systemctl daemon-reload else sudo /etc/init.d/movim stop