diff --git a/conf/LBCAlerte.cron b/conf/Cheky.cron similarity index 100% rename from conf/LBCAlerte.cron rename to conf/Cheky.cron diff --git a/conf/nginx.conf b/conf/nginx.conf index 8c76342..a33dae8 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -30,4 +30,6 @@ location YNH_WWW_PATH { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; -} + +# Very important security restriction +location /Cheky/var { deny all;} diff --git a/manifest.json b/manifest.json index effb9eb..be8c568 100644 --- a/manifest.json +++ b/manifest.json @@ -1,12 +1,12 @@ { - "name": "LBCAlerte", - "id": "LBCAlerte", + "name": "Cheky", + "id": "Cheky", "packaging_format": 1, "description": { - "en": "LBCAlerte package for YunoHost.", - "fr": "Application LBCAlerte pour YunoHost." + "en": "Cheky package for YunoHost.", + "fr": "Application Cheky pour YunoHost." }, - "url": "https://alerte.ilatumi.org/", + "url": "https://www.cheky.net/", "license": "free", "maintainer": { "name": "JimboJoe", @@ -28,8 +28,8 @@ "name": "domain", "type": "domain", "ask": { - "en": "Choose a domain name for LBCAlerte", - "fr": "Choisissez un nom de domaine pour LBCAlerte" + "en": "Choose a domain name for Cheky", + "fr": "Choisissez un nom de domaine pour Cheky" }, "example": "example.com" }, @@ -37,11 +37,11 @@ "name": "path", "type": "path", "ask": { - "en": "Choose a path for LBCAlerte", - "fr": "Choisissez un chemin pour LBCAlerte" + "en": "Choose a path for Cheky", + "fr": "Choisissez un chemin pour Cheky" }, - "example": "/LBCAlerte", - "default": "/LBCAlerte" + "example": "/Cheky", + "default": "/Cheky" }, { "name": "password", diff --git a/scripts/install b/scripts/install index 192cf62..d4d4390 100644 --- a/scripts/install +++ b/scripts/install @@ -22,15 +22,15 @@ sudo yunohost app checkurl "${domain}${path}" -a "$app" \ || ynh_die "Path not available: ${domain}${path}" # 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 -sudo unzip -qq LBCAlerte.zip -d .. +sudo unzip -qq Cheky.zip -d .. # Copy source files src_path=/var/www/$app sudo mkdir -p $src_path/var -sudo cp -a ../LBCAlerte*/. $src_path +sudo cp -a ../Cheky*/. $src_path # Set permissions to app files sudo chown -R www-data: $src_path @@ -60,9 +60,9 @@ ynh_app_setting_set "$app" unprotected_uris "/" sudo yunohost app ssowatconf -# Configure LBCAlerte via curl +# Configure Cheky via curl 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 if [ $is_public -eq 0 ]; @@ -73,6 +73,6 @@ fi # Add cron job cron_path="/etc/cron.d/$app" -sed -i "s@#DESTDIR#@${src_path}@g" ../conf/LBCAlerte.cron -sudo cp ../conf/LBCAlerte.cron "$cron_path" -sudo chmod 644 "$cron_path" \ No newline at end of file +sed -i "s@#DESTDIR#@${src_path}@g" ../conf/Cheky.cron +sudo cp ../conf/Cheky.cron "$cron_path" +sudo chmod 644 "$cron_path" diff --git a/scripts/upgrade b/scripts/upgrade index d6d740e..dfad344 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,15 +20,15 @@ language=$(ynh_app_setting_get "$app" language) path=${path%/} # 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 -sudo unzip -qq LBCAlerte.zip -d .. +sudo unzip -qq Cheky.zip -d .. # Copy source files src_path=/var/www/$app sudo mkdir -p $src_path -sudo cp -a ../LBCAlerte*/. $src_path +sudo cp -a ../Cheky*/. $src_path # Set permissions to app files # you may need to make some file and/or directory writeable by www-data (nginx user)