mirror of
https://github.com/ZeJMaN/LBCAlerte_ynh.git
synced 2025-06-07 21:15:29 +02:00
Rename LBCAlert to Cheky, upgrade to v3.8.1 and security fix
This commit is contained in:
parent
a38a83fea2
commit
5e999aa833
@ -30,4 +30,6 @@ location YNH_WWW_PATH {
|
|||||||
|
|
||||||
# Include SSOWAT user panel.
|
# Include SSOWAT user panel.
|
||||||
include conf.d/yunohost_panel.conf.inc;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
}
|
|
||||||
|
# Very important security restriction
|
||||||
|
location /Cheky/var { deny all;}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "LBCAlerte",
|
"name": "Cheky",
|
||||||
"id": "LBCAlerte",
|
"id": "Cheky",
|
||||||
"packaging_format": 1,
|
"packaging_format": 1,
|
||||||
"description": {
|
"description": {
|
||||||
"en": "LBCAlerte package for YunoHost.",
|
"en": "Cheky package for YunoHost.",
|
||||||
"fr": "Application LBCAlerte pour YunoHost."
|
"fr": "Application Cheky pour YunoHost."
|
||||||
},
|
},
|
||||||
"url": "https://alerte.ilatumi.org/",
|
"url": "https://www.cheky.net/",
|
||||||
"license": "free",
|
"license": "free",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "JimboJoe",
|
"name": "JimboJoe",
|
||||||
@ -28,8 +28,8 @@
|
|||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain",
|
"type": "domain",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Choose a domain name for LBCAlerte",
|
"en": "Choose a domain name for Cheky",
|
||||||
"fr": "Choisissez un nom de domaine pour LBCAlerte"
|
"fr": "Choisissez un nom de domaine pour Cheky"
|
||||||
},
|
},
|
||||||
"example": "example.com"
|
"example": "example.com"
|
||||||
},
|
},
|
||||||
@ -37,11 +37,11 @@
|
|||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Choose a path for LBCAlerte",
|
"en": "Choose a path for Cheky",
|
||||||
"fr": "Choisissez un chemin pour LBCAlerte"
|
"fr": "Choisissez un chemin pour Cheky"
|
||||||
},
|
},
|
||||||
"example": "/LBCAlerte",
|
"example": "/Cheky",
|
||||||
"default": "/LBCAlerte"
|
"default": "/Cheky"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "password",
|
"name": "password",
|
||||||
|
@ -22,15 +22,15 @@ sudo yunohost app checkurl "${domain}${path}" -a "$app" \
|
|||||||
|| ynh_die "Path not available: ${domain}${path}"
|
|| ynh_die "Path not available: ${domain}${path}"
|
||||||
|
|
||||||
# Download sources
|
# Download sources
|
||||||
sudo wget -q https://github.com/Blount/LBCAlerte/archive/3.3.zip -O LBCAlerte.zip
|
sudo wget -q https://github.com/Blount/Cheky/archive/3.8.1.zip -O Cheky.zip
|
||||||
|
|
||||||
# Uncompress
|
# Uncompress
|
||||||
sudo unzip -qq LBCAlerte.zip -d ..
|
sudo unzip -qq Cheky.zip -d ..
|
||||||
|
|
||||||
# Copy source files
|
# Copy source files
|
||||||
src_path=/var/www/$app
|
src_path=/var/www/$app
|
||||||
sudo mkdir -p $src_path/var
|
sudo mkdir -p $src_path/var
|
||||||
sudo cp -a ../LBCAlerte*/. $src_path
|
sudo cp -a ../Cheky*/. $src_path
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
sudo chown -R www-data: $src_path
|
sudo chown -R www-data: $src_path
|
||||||
@ -60,9 +60,9 @@ ynh_app_setting_set "$app" unprotected_uris "/"
|
|||||||
sudo yunohost app ssowatconf
|
sudo yunohost app ssowatconf
|
||||||
|
|
||||||
|
|
||||||
# Configure LBCAlerte via curl
|
# Configure Cheky via curl
|
||||||
sleep 2
|
sleep 2
|
||||||
curl --resolve $domain:443:127.0.0.1 -kL -X POST https://$domain$path/index.php?mod=install --data "password=$password&confirmPassword=$password&type=db&db[host]=localhost&db[user]=$dbuser&db[password]=$dbpass&db[dbname]=$dbname" > /tmp/LBCAlerte-install.log 2>&1
|
curl --resolve $domain:443:127.0.0.1 -kL -X POST https://$domain$path/index.php?mod=install --data "password=$password&confirmPassword=$password&type=db&db[host]=localhost&db[user]=$dbuser&db[password]=$dbpass&db[dbname]=$dbname" > /tmp/Cheky-install.log 2>&1
|
||||||
|
|
||||||
#protect URIs if private
|
#protect URIs if private
|
||||||
if [ $is_public -eq 0 ];
|
if [ $is_public -eq 0 ];
|
||||||
@ -73,6 +73,6 @@ fi
|
|||||||
|
|
||||||
# Add cron job
|
# Add cron job
|
||||||
cron_path="/etc/cron.d/$app"
|
cron_path="/etc/cron.d/$app"
|
||||||
sed -i "s@#DESTDIR#@${src_path}@g" ../conf/LBCAlerte.cron
|
sed -i "s@#DESTDIR#@${src_path}@g" ../conf/Cheky.cron
|
||||||
sudo cp ../conf/LBCAlerte.cron "$cron_path"
|
sudo cp ../conf/Cheky.cron "$cron_path"
|
||||||
sudo chmod 644 "$cron_path"
|
sudo chmod 644 "$cron_path"
|
||||||
|
@ -20,15 +20,15 @@ language=$(ynh_app_setting_get "$app" language)
|
|||||||
path=${path%/}
|
path=${path%/}
|
||||||
|
|
||||||
# Download sources
|
# Download sources
|
||||||
sudo wget -q https://github.com/Blount/LBCAlerte/archive/3.3.zip -O LBCAlerte.zip
|
sudo wget -q https://github.com/Blount/Cheky/archive/3.3.zip -O Cheky.zip
|
||||||
|
|
||||||
# Uncompress
|
# Uncompress
|
||||||
sudo unzip -qq LBCAlerte.zip -d ..
|
sudo unzip -qq Cheky.zip -d ..
|
||||||
|
|
||||||
# Copy source files
|
# Copy source files
|
||||||
src_path=/var/www/$app
|
src_path=/var/www/$app
|
||||||
sudo mkdir -p $src_path
|
sudo mkdir -p $src_path
|
||||||
sudo cp -a ../LBCAlerte*/. $src_path
|
sudo cp -a ../Cheky*/. $src_path
|
||||||
|
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
# you may need to make some file and/or directory writeable by www-data (nginx user)
|
# you may need to make some file and/or directory writeable by www-data (nginx user)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user