diff options
| author | WerWolv <werwolv98@gmail.com> | 2022-04-13 12:55:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-13 12:55:33 +0200 |
| commit | efa5dc61c758b9cb55052f85b58131c3d1771e06 (patch) | |
| tree | 3dacfe9bb95b77b92baf0c28f1525422d940f3f2 /dist/install_nightly.sh | |
| parent | e3d7b50bd91fa092a9d40be3ce016c330f9311ca (diff) | |
| download | decky-loader-efa5dc61c758b9cb55052f85b58131c3d1771e06.tar.gz decky-loader-efa5dc61c758b9cb55052f85b58131c3d1771e06.zip | |
Update install scripts to install loader as system service
Diffstat (limited to 'dist/install_nightly.sh')
| -rw-r--r-- | dist/install_nightly.sh | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/dist/install_nightly.sh b/dist/install_nightly.sh index a03a26cb..55df435b 100644 --- a/dist/install_nightly.sh +++ b/dist/install_nightly.sh @@ -1,5 +1,10 @@ #!/bin/sh +if [ "$(whoami)" != "root" ]; then + su -c "$0 $*" + exit +fi + echo "Installing Steam Deck Plugin Loader nightly..." HOMEBREW_FOLDER=/home/deck/homebrew @@ -18,15 +23,17 @@ cp /tmp/plugin_loader/PluginLoader ${HOMEBREW_FOLDER}/services/PluginLoader rm -rf /tmp/plugin_loader chmod +x ${HOMEBREW_FOLDER}/services/PluginLoader -systemctl --user stop plugin_loader 2> /dev/null -systemctl --user disable plugin_loader 2> /dev/null -rm -f /home/deck/.config/systemd/user/plugin_loader.service -cat > /home/deck/.config/systemd/user/plugin_loader.service <<- EOM +systemctl stop plugin_loader 2> /dev/null +systemctl disable plugin_loader 2> /dev/null +rm -f /etc/systemd/system/plugin_loader.service +cat > /etc/systemd/system/plugin_loader.service <<- EOM [Unit] Description=SteamDeck Plugin Loader [Service] Type=simple +User=root +Restart=always ExecStart=/home/deck/homebrew/services/PluginLoader WorkingDirectory=/home/deck/homebrew/services @@ -34,8 +41,8 @@ WorkingDirectory=/home/deck/homebrew/services Environment=PLUGIN_PATH=/home/deck/homebrew/plugins [Install] -WantedBy=default.target +WantedBy=multi-user.target EOM -systemctl --user daemon-reload -systemctl --user start plugin_loader -systemctl --user enable plugin_loader
\ No newline at end of file +systemctl daemon-reload +systemctl start plugin_loader +systemctl enable plugin_loader
\ No newline at end of file |
