fix: use actual names for files
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ea6bfc9c04
commit
a28a5ca6ee
12
install.sh
12
install.sh
@ -8,6 +8,8 @@ APP_VERSION="latest" # or specify a version
|
||||
S3_BUCKET="rust-artifacts"
|
||||
BINARY_NAME="churn"
|
||||
SERVICE_NAME="${APP_NAME}.service"
|
||||
SERVICE_UPDATE_NAME="${APP_NAME}-update.service"
|
||||
TIMER_UPDATE_NAME="${APP_NAME}-update.timer"
|
||||
INSTALL_DIR="/usr/local/bin"
|
||||
CONFIG_DIR="/etc/${APP_NAME}"
|
||||
CHURN_DISCOVERY="https://churn.prod.kjuulh.app"
|
||||
@ -82,7 +84,7 @@ WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
echo "Creating churn update service..."
|
||||
cat > "/etc/systemd/system/${SERVICE_NAME}-update" <<EOF
|
||||
cat > "/etc/systemd/system/${SERVICE_UPDATE_NAME}" <<EOF
|
||||
[Unit]
|
||||
Description=Daily Churn Update Service
|
||||
After=network-online.target
|
||||
@ -97,7 +99,7 @@ User=root
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat > "/etc/systemd/system/${SERVICE_NAME}-update.timer" <<EOF
|
||||
cat > "/etc/systemd/system/${TIMER_UPDATE_NAME}" <<EOF
|
||||
[Unit]
|
||||
Description=Run Churn Update Daily
|
||||
|
||||
@ -116,10 +118,10 @@ systemctl daemon-reload
|
||||
systemctl enable "${SERVICE_NAME}"
|
||||
systemctl start "${SERVICE_NAME}"
|
||||
|
||||
systemctl enable "${SERVICE_NAME}-update"
|
||||
systemctl enable "${SERVICE_UPDATE_NAME}"
|
||||
|
||||
systemctl enable "${SERVICE_NAME}-update.timer"
|
||||
systemctl start "${SERVICE_NAME}-update.timer"
|
||||
systemctl enable "${TIMER_UPDATE_NAME}"
|
||||
systemctl start "${TIMER_UPDATE_NAME}"
|
||||
|
||||
# Check service status
|
||||
if systemctl is-active --quiet "${SERVICE_NAME}"; then
|
||||
|
Loading…
Reference in New Issue
Block a user