Use systemd/system unit for mastodon services

This commit is contained in:
Jeffrey Serio 2024-06-20 12:44:04 -05:00
parent fc5fe7e80d
commit 15c1cf50c9
5 changed files with 10 additions and 7 deletions

View File

@ -17,15 +17,12 @@ gmcapsuled:
cp -v "${PWD}/gmcapsulerc" ~/.gmcapsulerc
mastodon:
sudo mkdir -p /home/mastodon/.config/systemd/user
sudo cp -v "${PWD}/systemd/user/mastodon-db-backup.service" /home/mastodon/.config/systemd/user/
sudo cp -v "${PWD}/systemd/user/mastodon-db-backup.timer" /home/mastodon/.config/systemd/user/
sudo cp -v "${PWD}/systemd/user/mastodon-system-to-minio.service" /home/mastodon/.config/systemd/user/
sudo cp -v "${PWD}/systemd/user/mastodon-system-to-minio.timer" /home/mastodon/.config/systemd/user/
sudo chown -R mastodon:mastodon /home/mastodon/.config
sudo cp -v "${PWD}/systemd/system/mastodon"* /etc/systemd/system/
sudo cp -v "${PWD}/bin/mastodon-db-backup" /usr/local/bin
sudo chown -R root:root /usr/local/bin/mastodon-db-backup
sudo loginctl enable-linger
sudo chmod 755 /usr/local/bin/mastodon-db-backup
sudo systemctl enable --now mastodon-db-backup.timer
sudo systemctl enable --now mastodon-system-to-minio.timer
thelounge:
curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest \

View File

@ -5,6 +5,9 @@ AssertFileIsExecutable=/usr/local/bin/mastodon-db-backup
[Service]
Type=oneshot
User=mastodon
Group=mastodon
WorkingDirectory=/home/mastodon
ExecStart=/usr/local/bin/mastodon-db-backup
[Install]

View File

@ -4,6 +4,9 @@ Wants=network.target
[Service]
Type=oneshot
User=mastodon
Group=mastodon
WorkingDirectory=/home/mastodon
ExecStart=rclone copy --progress --transfers=8 /home/mastodon/live/public/system/ minio:mastodata
[Install]