2022-02-04 19:16:57 +01:00
2022-02-04 13:40:17 +01:00
2022-02-04 18:53:32 +01:00
2022-02-04 10:26:04 +01:00
2022-02-04 10:26:04 +01:00
2022-02-04 18:53:32 +01:00
2022-02-04 10:26:04 +01:00
2022-02-04 10:26:04 +01:00
2022-02-04 19:16:57 +01:00

Remote control for systemctl --user start/stop

Install

Add systemctl service

Add a user service: $HOME/.config/systemd/user/default.target.wants/remotesystemctl.service

[Unit]
Description=RemoteSystemctl
Documentation=

[Service]
ExecStart=$HOME/RemoteSystemctl/app.rb
Restart=on-failure
RestartSec=5
WorkingDirectory=$HOME/RemoteSystemctl

[Install]
WantedBy=default.target

Enable it at reboot

systemctl --user enable remotesystemctl.service

Start it right now

systemctl --user start remotesystemctl.service

Configure

Copy .env.sample to .env.local and customize. You can add/remove services using their exact name with PASSWORD_xxx env variables.

Setup ruby

Have ruby >= 3.1 installed with gems and the bundler gem.

Then simply use bundle install to install the dependencies (see the Gemfile, there should a very low amount of dependencies).

Description
Can run systemctl --user commands, protected with shared passwords.
Readme 34 KiB
Languages
Ruby 65.5%
Slim 34.5%