diff options
author | Georg Pfuetzenreuter | 2021-07-23 18:21:27 +0200 |
---|---|---|
committer | Georg Pfuetzenreuter | 2021-07-23 18:21:27 +0200 |
commit | bfe703327fda52dd601a878bbd70352ebbb92810 (patch) | |
tree | 212c5884681979f61c60c5c7bc6724abedf824a0 /scripts/sh/deploy_ergo.sh | |
parent | c85c094f27483abb76a3cd4e1ed8fa8e88f3bd43 (diff) | |
download | system-bfe703327fda52dd601a878bbd70352ebbb92810.tar.gz system-bfe703327fda52dd601a878bbd70352ebbb92810.tar.bz2 system-bfe703327fda52dd601a878bbd70352ebbb92810.zip |
Ergo deployment improvements, new Ergo update and Ergo removal scripts
Signed-off-by: Georg Pfuetzenreuter <georg@lysergic.dev>
Diffstat (limited to 'scripts/sh/deploy_ergo.sh')
-rwxr-xr-x | scripts/sh/deploy_ergo.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/sh/deploy_ergo.sh b/scripts/sh/deploy_ergo.sh index 83b6b03..29eb9e0 100755 --- a/scripts/sh/deploy_ergo.sh +++ b/scripts/sh/deploy_ergo.sh @@ -21,6 +21,34 @@ cd /opt/ergo/ergo-git sudo -u ergo make build sudo -u ergo chmod +x ergo ln -s /opt/ergo/ergo-git/ergo /opt/ergo/ergo +cat <<'EOF' >/etc/systemd/system/ergo.service +[Unit] +Description=Ergo IRCd +After=network.target + +[Service] +Type=simple +User=ergo +Group=ergo +ExecStart=/opt/ergo/ergo run --conf /opt/ergo/ircd.yaml +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-failure +LimitNOFILE=1048576 +SyslogIdentifier=ergo + +[Install] +WantedBy=multi-user.target +EOF +sudo -u ergo cp /opt/ergo/ergo-git/default.yaml /opt/ergo/ircd.yaml +sudo -u ergo mkdir /opt/ergo/tls +sed -i 's/path: ircd.db/path: \/opt\/ergo\/ircd.db/' /opt/ergo/ircd.yaml +sed -i 's/cert: fullchain.pem/cert: \/opt\/ergo\/tls\/fullchain.pem/' /opt/ergo/ircd.yaml +sed -i 's/key: privkey.pem/key: \/opt\/ergo\/tls\/privkey.pem/' /opt/ergo/ircd.yaml +sed -i 's/path: languages/path: \/opt\/ergo\/ergo-git\/languages/' /opt/ergo/ircd.yaml +sudo -u ergo /opt/ergo/ergo initdb --conf /opt/ergo/ircd.yaml +sudo -u ergo /opt/ergo/ergo mkcerts --conf /opt/ergo/ircd.yaml +systemctl enable ergo.service +systemctl start ergo.service fi else echo "This is currently only compatible with Go 1.16.6 or higher. Consider deploy_go.sh." |