Skip to content
Snippets Groups Projects
Commit bdf53132 authored by Rolf Niepraschk's avatar Rolf Niepraschk
Browse files

update_from_git

parent 060aa4bb
Branches
No related tags found
No related merge requests found
#! /bin/bash
# Rolf Niepraschk (Rolf.Niepraschk@ptb.de), 2025-06-11
# Installiert eine neue Version vom zugehörigen GIT-Repositorium
# und lädt den Server-Prozess neu.
# Aufruf als root (auf dem Server!):
#
# ./update_from_git
#
PROJECT="webapps-deliverer"
GITLAB_URL=https://gitlab1.ptb.de/vaclab/${PROJECT}/-/archive/master/${PROJECT}-master.tar.gz
DEST_USER=nobody
if [ $(getent group nobody) ]; then
DEST_GROUP=nobody
else
DEST_GROUP=nogroup
fi
# Struktur des tar-Archives herunterladen und gleichzeitig entpacken
curl -s -o - ${GITLAB_URL} | tar -xzf - --strip-components=1
chown -R ${DEST_USER}:${DEST_GROUP} ./
systemctl daemon-reload
systemctl restart ${PROJECT}.service
exit
[Unit]
Description=Restart the webapps deliverer server
#Documentation=
[Service]
Type=oneshot
WorkingDirectory=/usr/local/share/webapps-deliverer
EnvironmentFile=-/etc/environment
Environment=XDG_CACHE_HOME=/var/tmp
Environment=HOST=%H
ExecStart=/bin/bash -lc 'systemctl restart webapps-deliverer.service'
[Unit]
Description=Restart the webapps deliverer server (Timer)
[Timer]
Persistent=false
OnCalendar=Mon..Fri *-*-* 20:00:17
[Install]
WantedBy=timers.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment