-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Battles are active right now so this cannot be deployed yet, but shou…
…ld put the nail in the deploy issue coffin. Work for #97
- Loading branch information
jakethedev
committed
Dec 15, 2021
1 parent
3e52a36
commit 0ed361e
Showing
5 changed files
with
26 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
#!/usr/bin/env bash | ||
# SYSTEMD SETUP | ||
#### SYSTEMD SETUP | ||
# NOTE If you have 236+, uncomment the StandardOutput/Error lines in the | ||
# service if you'd like to output logs and errors to custom locations. Else | ||
# it's journalctl for you | ||
|
||
echo "Copying service file to /etc/systemd/system..." | ||
# Installation of the unit file | ||
TARGETDIR="$HOME/.config/systemd/user/" | ||
echo "Copying service file to user unit directory..." | ||
systemd --version | ||
# If you have 236+, uncomment the StandardOutput/Error lines in the service if you'd like to output | ||
# logs and errors to custom locations. Else it's journalctl for you | ||
sudo cp beatbattlebot.service /etc/systemd/system/ | ||
cp beatbattlebot.service $TARGETDIR | ||
|
||
echo "Reloading daemon, enabling and starting beatbattlebot service" | ||
sudo systemctl daemon-reload | ||
systemctl status beatbattlebot # It should say 'not loaded' | ||
sudo systemctl enable beatbattlebot | ||
sudo systemctl start beatbattlebot | ||
# Enabling, activating, and kickstarting the unit file | ||
systemctl --user daemon-reload | ||
echo "=== The following should say 'not loaded', otherwise, good luck ===" | ||
systemctl --user status beatbattlebot # It should say 'not loaded' | ||
systemctl --user enable beatbattlebot | ||
systemctl --user start beatbattlebot | ||
echo "Sleeping, then checking status" | ||
sleep 1 | ||
sudo journalctl -f | ||
# You should see healthy output and a logged-in message | ||
systemctl --user status beatbattlebot # It should say 'not loaded' | ||
|
||
echo "Setting up logrotate" | ||
sudo ln -s $(pwd)/logrotate.beatbattlebot /etc/logrotate.d/ | ||
# Quick logging config | ||
# echo "Setting up logrotate" | ||
# sudo ln -s $(pwd)/logrotate.beatbattlebot /etc/logrotate.d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
notifempty | ||
compress | ||
postrotate | ||
systemctl restart beatbattlebot | ||
systemctl --user restart beatbattlebot | ||
endscript | ||
} | ||
|