22 lines
778 B
Bash
Executable File
22 lines
778 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$PROJECT_ROOT"
|
|
|
|
install -m 0644 deploy/systemd/cm95-global.service /etc/systemd/system/cm95-global.service
|
|
install -m 0644 deploy/systemd/cm95-global.timer /etc/systemd/system/cm95-global.timer
|
|
mkdir -p /mnt/sda1/cm95-global/{state/tags,state/locks,logs,reports,manifests,pbf}
|
|
|
|
systemctl daemon-reload
|
|
|
|
if [[ "${1:-}" == "--enable" ]]; then
|
|
systemctl enable --now cm95-global.timer
|
|
fi
|
|
|
|
echo "Installed: /etc/systemd/system/cm95-global.service"
|
|
echo "Installed: /etc/systemd/system/cm95-global.timer"
|
|
echo "Enable: systemctl enable --now cm95-global.timer"
|
|
echo "Status: systemctl status cm95-global.timer --no-pager"
|
|
echo "Pipeline: .venv/bin/cm95global status"
|