mirror of
https://codeberg.org/hyperreal/admin-scripts
synced 2024-11-01 16:03:06 +01:00
Use systemd/system unit for mastodon services
This commit is contained in:
parent
fc5fe7e80d
commit
15c1cf50c9
11
pi0/justfile
11
pi0/justfile
@ -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 \
|
||||
|
@ -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]
|
@ -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]
|
Loading…
Reference in New Issue
Block a user