Skip to content

Commit 6c662ae

Browse files
authored
Garage: fix Service
1 parent 5c04c89 commit 6c662ae

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

install/garage-install.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,32 @@ metrics_token = "${METRICS_TOKEN}"
5959
EOF
6060
msg_ok "Set up Garage"
6161

62+
63+
msg_info "Creating service"
64+
cat <<'EOF' >/etc/systemd/system/garage.service
65+
[Unit]
66+
Description=Garage Object Storage (Deuxfleurs)
67+
After=network-online.target
68+
Wants=network-online.target
69+
70+
[Service]
71+
Type=simple
72+
ExecStart=/usr/local/bin/garage -c /etc/garage.toml server
73+
Restart=always
74+
RestartSec=5
75+
User=root
76+
WorkingDirectory=/var/lib/garage
77+
Environment=RUST_LOG=info
78+
StandardOutput=append:/var/log/garage.log
79+
StandardError=append:/var/log/garage.log
80+
LimitNOFILE=65536
81+
82+
[Install]
83+
WantedBy=multi-user.target
84+
EOF
85+
$STD systemctl enable -q --now garage
86+
msg_ok "Created Service"
87+
6288
motd_ssh
6389
customize
6490

0 commit comments

Comments
 (0)