Quotidien Shaarli
October 25, 2024
read -p "User: " user
wget https://www.dwservice.net/download/dwagent.sh
DISPLAY="" sudo bash dwagent.sh
sudo systemctl stop dwagent.service
sudo systemctl disable dwagent.service
cd ~
mkdir -p .config/systemd/user
cd .config/systemd/user/
sudo mv /etc/systemd/system/dwagent.service .
sudo chown $user:$user dwagent.service
sed -i 's/WantedBy=multi-user.target/WantedBy=default.target/' ~/.config/systemd/user/dwagent.service
sudo chown -R $user:$user/opt/dwagent
sudo loginctl enable-linger $user
systemctl --user enable dwagent
systemctl --user start dwagent
systemctl --user status dwagent