snikket_ynh/scripts/_common.sh

34 lines
915 B
Bash
Raw Normal View History

2024-05-18 15:16:58 +00:00
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
if [[ $(lsb_release --codename --short) == "bookworm" ]]; then
luaversion="5.4"
else
luaversion="5.2"
fi
#=================================================
# PERSONAL HELPERS
#=================================================
2024-05-26 22:08:46 +00:00
install_certificates() {
domains=("$domain" "groups.$domain" "share.$domain")
for d in "${domains[@]}"
do
cp "/etc/yunohost/certs/$d/crt.pem" "/etc/snikket/certs/${d}.crt"
cp "/etc/yunohost/certs/$d/key.pem" "/etc/snikket/certs/${d}.key"
done
chown $app /etc/snikket/certs/*
}
2024-05-18 15:16:58 +00:00
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================