1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/squid3_ynh.git synced 2024-09-03 20:26:11 +02:00
squid3_ynh/scripts/_common.sh
2024-01-31 21:35:45 +01:00

34 lines
1 KiB
Bash

#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
#=================================================
# PERSONAL HELPERS
#=================================================
find_squid_version() {
# See if squid3 folder exits
if [ -d "/etc/squid3" ]; then
squid_name="squid3"
# If squid3 folder is not found look for squid folder
elif [ -d "/etc/squid" ]; then
squid_name="squid"
# If both folders are not found then call ynh_die
else
ynh_die --message="No squid folder found in /etc. Looks like squid3 package is not installed. Try installing it manually."
fi
ynh_app_setting_set --app="$app" --key="squid_name" --value="$squid_name"
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================
#=================================================
# FUTURE OFFICIAL HELPERS
#=================================================