]> apps.delaporte.us Git - matrix-cadbury.git/blob - service/install.sh
Add borg config
[matrix-cadbury.git] / service / install.sh
1 # Installs at system level for autostart
2 # Requires sudo
3 # Pass the path to an appropriate .env as $1
4
5 echo "Will copy config from '$1'"
6
7 INSTALL=/etc/matrix-cadbury
8
9 ADD_SRV=cadbury.service
10 DEST=/etc/systemd/system
11
12 # Install as system package
13 cd /etc; git clone https://codeberg.org/EdTheDev/matrix-cadbury.git
14
15 # Add initial config
16 cp $1 $INSTALL/.env
17
18 # Install as systemd service
19 mkdir -p $DEST
20 rm -f $DEST/$ADD_SRV
21 cp $INSTALL/service/$ADD_SRV $DEST/
22 ls -al $DEST | grep $ADD_SRV
23
24 systemctl daemon-reload
25 systemctl enable $ADD_SRV
26 systemctl status $ADD_SRV