mirror of
https://github.com/wweir/sower.git
synced 2026-10-20 08:16:35 +00:00
Installing sower meant grabbing a tarball and wiring the service up by hand, and the packaged unit was too fragile for something a resolver depends on (on-failure restart after 1min, no memory limit). Add install.sh: detects the platform and init system, installs or upgrades the binary atomically, keeps an existing config, verifies the release SHA256SUMS unless explicitly opted out, and registers the service on systemd, OpenWrt procd or macOS launchd. Every network call carries an explicit timeout, the OpenWrt init script ships in Linux tarballs, the release workflow generates SHA256SUMS, the README documents the installer, and make test syntax-checks the scripts.
23 lines
738 B
Desktop File
23 lines
738 B
Desktop File
[Unit]
|
|
Description=sower client service
|
|
Documentation=https://github.com/sower-proxy/sower
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=/etc/sower
|
|
# Keep the soft heap limit well above the ~105MB live rule heap: a limit at
|
|
# that level pins the GC goal to the live heap and burns CPU on every
|
|
# allocation. Matches the binary default and is declared here so a deployment
|
|
# can tune it without rebuilding (0 disables the soft limit).
|
|
Environment=SOWER_MEMORY_LIMIT_MB=512
|
|
ExecStart=/usr/local/bin/sower -c /etc/sower/sower.toml
|
|
# The system resolver may point at this service, so it must come back fast.
|
|
Restart=always
|
|
RestartSec=3
|
|
LimitNOFILE=65535
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|