]> rtime.felk.cvut.cz Git - novaboot.git/blobdiff - server/adduser-novaboot
Rename novaboot-power-off.service to novaboot-delayed-power-off.service
[novaboot.git] / server / adduser-novaboot
index 928e76358cb4bc01dbee7449da8ef380c469e602..dec3804cc2bf18ea953d624443a5ae6ee59d11f7 100755 (executable)
@@ -69,17 +69,6 @@ else
     echo "NOT creating /srv/tftp/$user and symlink to it from $home/tftproot."
 fi
 
-if [ -d /run/systemd/system ]; then
-    echo "Installing systemd services and timers in /etc/systemd/system/user@$uid.service.d"
-    mkdir -p /etc/systemd/system/user@$uid.service.d
-    cat <<EOF > /etc/systemd/system/user@$uid.service.d/novaboot-server.conf
-[Unit]
-Requires=novaboot-server-session@$user.service
-After=novaboot-server-session@$user.service
-EOF
-    systemctl daemon-reload
-fi
-
 echo "Creating configuration template in $home/.novaboot-shell"
 cat <<'CONFIG_EOF' > $home/.novaboot-shell
 #!/bin/sh
@@ -105,6 +94,18 @@ cat <<'CONFIG_EOF' > $home/.novaboot-shell
 CONFIG_EOF
 chown $user: $home/.novaboot-shell
 
+if [ -d /run/systemd/system ]; then
+    cat <<EOF
+To enable automatic delayed power-off run 'systemctl --user enable novaboot-delayed-power-off'
+as the created user (e.g. via shell subcommand)
+EOF
+    # TODO: Add a way to run in automatically from here (allow shell
+    #subcommand to accept command lines)
+    #systemctl --user enable novaboot-delayed-power-off
+fi
+
+
+
 echo "Done"
 exit 0