Skip to content

Commit 2a38f66

Browse files
committed
fix systemd file deployment
1 parent ca22f8e commit 2a38f66

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

deploy.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,23 @@ echo "[7/7] Installing sync service..."
7171
chmod +x "${REPO_DIR}"/scripts/sync-*.sh
7272

7373
mkdir -p ~/.config/systemd/user
74-
cp "${REPO_DIR}/systemd/company-os-sync.service" ~/.config/systemd/user/
74+
cat > ~/.config/systemd/user/company-os-sync.service <<EOF
75+
[Unit]
76+
Description=Company OS S3 Sync Daemon
77+
After=network-online.target
78+
Wants=network-online.target
79+
80+
[Service]
81+
Type=simple
82+
ExecStart=${REPO_DIR}/scripts/sync-all.sh
83+
Restart=always
84+
RestartSec=10
85+
Environment=SYNC_INTERVAL=300
86+
Environment=PATH=${HOME}/.local/bin:${HOME}/.bun/bin:/usr/local/bin:/usr/bin:/bin
87+
88+
[Install]
89+
WantedBy=default.target
90+
EOF
7591

7692
systemctl --user daemon-reload
7793
systemctl --user enable company-os-sync.service

systemd/company-os-sync.service

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)