From e1a9b45f9b0ce9ccd76586bf38e7dd806ca92618 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Mon, 25 Sep 2017 21:22:55 +0000 Subject: [PATCH] corrected missing equal sign --- .../install-systemd-service | 24 +++++++++++++++---- .../mts-ENLIVEN.service | 2 +- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/etc/change_hardcoded_world_and_username_manually_first/install-systemd-service b/etc/change_hardcoded_world_and_username_manually_first/install-systemd-service index 81b4772..799cd8f 100644 --- a/etc/change_hardcoded_world_and_username_manually_first/install-systemd-service +++ b/etc/change_hardcoded_world_and_username_manually_first/install-systemd-service @@ -6,7 +6,7 @@ #* Ignores invalid directives and starts the service ... # systemd-analyze verify file to get warnings on typos and badly formatted options. #* requires full path, so ExecStart=/bin/sleep 20 works but ExecStart=sleep 20 does not. - +#* custom system-wide scripts go in /etc/systemd/system/, builtin services which reside in /usr/lib/systemd/system/ (and custom ones may override system-wide ones) ## Known Issues # * should use machinectl shell instead of su or sudo as of 2016 updates to systemd @@ -18,14 +18,28 @@ # instead of User=owner #Update the unit: +cd $HOME/Downloads if [ -f mts-ENLIVEN.service ]; then #clear old downloaded copy if exists in userspace rm mts-ENLIVEN.service fi -wget https://github.com/expertmm/EnlivenMinetest/raw/master/etc//home/owner/Documents/GitHub/EnlivenMinetest/etc/change_hardcoded_world_and_username_manually_first/install-systemd-service/mts-ENLIVEN.service +wget https://github.com/expertmm/EnlivenMinetest/raw/master/etc/change_hardcoded_world_and_username_manually_first/mts-ENLIVEN.service echo "This will only work if you are using systemd." -sudo mv -f mts-ENLIVEN.service /etc/init.d/ +sudo mv -f mts-ENLIVEN.service /etc/systemd/system/ +#sudo chmod +x /etc/systemd/system/mts-ENLIVEN.service +sudo chmod 644 /etc/systemd/system/mts-ENLIVEN.service +#644 since should not be executable ( 1 is the executable flag bit ) +sudo chown root /etc/systemd/system/mts-ENLIVEN.service +sudo chgrp root /etc/systemd/system/mts-ENLIVEN.service #? sudo mv -f mts-ENLIVEN.service /etc/systemd/system/ #enable the mts-ENLIVEN systemd service on Ubuntu: -sudo service mts-ENLIVEN enable -sudo service mts-ENLIVEN start +#sudo service mts-ENLIVEN enable +#sudo service mts-ENLIVEN start +sudo systemctl enable mts-ENLIVEN +sudo systemctl start mts-ENLIVEN + +#VIEW STATUS LIKE: +#sudo journalctl -u mts-ENLIVEN +##OR +#sudo systemctl status mts-ENLIVEN +#(press q to exit) diff --git a/etc/change_hardcoded_world_and_username_manually_first/mts-ENLIVEN.service b/etc/change_hardcoded_world_and_username_manually_first/mts-ENLIVEN.service index 06d639b..ae9cb03 100644 --- a/etc/change_hardcoded_world_and_username_manually_first/mts-ENLIVEN.service +++ b/etc/change_hardcoded_world_and_username_manually_first/mts-ENLIVEN.service @@ -1,5 +1,5 @@ [Unit] -description "Job that runs mts-ENLIVEN minetest server as specific user" +description="Job that runs mts-ENLIVEN minetest server as specific user" After=network.target [Service]