mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 22:46:33 +02:00
- adding migrate-from-athena (copying server state over, launching services) - deletes all server files on purge
64 lines
1.2 KiB
Bash
64 lines
1.2 KiB
Bash
#!/bin/sh
|
|
# functions to assist with deb management
|
|
|
|
getAthenaEnabled()
|
|
{
|
|
return systemctl list-units --state=loaded \
|
|
| grep -P "(athena-assignment-client|athena-domain-server|athena-server)" \
|
|
| cut -d' ' -f 1 \
|
|
| xargs -I {} sh -c 'if systemctl is-enabled {} >/dev/null ; then echo {} ; fi' \
|
|
| paste -s -d'|'
|
|
}
|
|
|
|
getVircadiaEnabled()
|
|
{
|
|
return systemctl list-units --state=loaded \
|
|
| grep -P "(vircadia-assignment-client|vircadia-domain-server|vircadia-server)" \
|
|
| cut -d' ' -f 1 \
|
|
| xargs -I {} sh -c 'if systemctl is-enabled {} >/dev/null ; then echo {} ; fi' \
|
|
| paste -s -d'|'
|
|
}
|
|
|
|
getAthenaActive()
|
|
{
|
|
return systemctl list-units \
|
|
| grep -P "(athena-assignment-client|athena-domain-server|athena-server)" \
|
|
| cut -d' ' -f 1 \
|
|
| paste -s -d'|'
|
|
}
|
|
|
|
getVircadiaActive()
|
|
{
|
|
return systemctl list-units \
|
|
| grep -P "(vircadia-assignment-client|vircadia-domain-server|vircadia-server)" \
|
|
| cut -d' ' -f 1 \
|
|
| paste -s -d'|'
|
|
}
|
|
|
|
disableList()
|
|
{
|
|
echo $1 \
|
|
| xargs -d'|' \
|
|
| systemctl disable
|
|
}
|
|
|
|
enableList()
|
|
{
|
|
echo $1 \
|
|
| xargs -d'|' \
|
|
| systemctl enable
|
|
}
|
|
|
|
stopList()
|
|
{
|
|
echo $1 \
|
|
| xargs -d'|' \
|
|
| systemctl stop
|
|
}
|
|
|
|
startList()
|
|
{
|
|
echo $1 \
|
|
| xargs -d'|' \
|
|
| systemctl start
|
|
}
|