Skip to content

Commit

Permalink
chore: Add delay between restarts for systemd
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulrahman1s committed Sep 6, 2022
1 parent 033ec84 commit 33f2a37
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ mkdir -p "$install_path"
curl --fail --location --progress-bar --output "$exe.tar.gz" "$arcive_url"
tar -xzvf "$exe.tar.gz" -C "$install_path"
rm "$exe.tar.gz"
chmod +x "$exe"

if command -v termux-setup-storage; then
mkdir -p ~/.termux/boot
Expand All @@ -76,13 +77,14 @@ if command -v systemctl >/dev/null; then
mkdir -p ~/.config/systemd/user/
systemctl --user disable rsink
echo "[Unit]
Description=Rsink syncls
Description=RSink background service
After=network.target
[Service]
Type=simple
ExecStart=$exe
Restart=always
RestartSec=30
[Install]
WantedBy=multi-user.target" >~/.config/systemd/user/rsink.service
Expand All @@ -91,6 +93,6 @@ WantedBy=multi-user.target" >~/.config/systemd/user/rsink.service
systemctl --user status rsink
fi

echo "Rsink was installed successfully to $exe"
echo "Please edit/create $HOME/.config/rsink/config.toml to configure the settings"
echo "An example of the configuration file at https://github.com/abdulrahman1s/RSink/blob/master/config.example.toml"
echo "RSink was installed successfully to $exe"
echo "Please configure the missing fields at $HOME/.config/rsink/config.toml"
echo "An example of the configuration file located at https://github.com/abdulrahman1s/RSink/blob/master/config.example.toml"

0 comments on commit 33f2a37

Please sign in to comment.