mirror of
https://github.com/YunoHost-Apps/cheky_ynh.git
synced 2024-09-03 18:16:00 +02:00
commit
e4d9c693a7
8 changed files with 19 additions and 65 deletions
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/Blount/Cheky/archive/3.8.1.tar.gz
|
||||
SOURCE_SUM=b9170bc075c73f3e18638ed992541a4c562dd5447e6e4085a8798277184785dc
|
||||
SOURCE_URL=https://github.com/Blount/Cheky/archive/4.1.tar.gz
|
||||
SOURCE_SUM=320ea86a73c3e54809fd560959ac893df87a5dd663ff2176469c41e80b1d2434
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
location __PATH__ {
|
||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
|
||||
# Path to source
|
||||
alias __FINALPATH__/ ;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
# Example PHP configuration (remove if not used)
|
||||
### Example PHP configuration (remove it if not used)
|
||||
index index.php;
|
||||
|
||||
# Common parameter to increase upload size limit in conjuction with dedicated php-fpm file
|
||||
|
@ -18,20 +20,13 @@ location __PATH__ {
|
|||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php5-fpm-__NAME__.sock;
|
||||
|
||||
# If you don't use a dedicated fpm config for your app,
|
||||
# use a general fpm pool.
|
||||
# This is to be used INSTEAD of line above
|
||||
# Don't forget to adjust scripts install/upgrade/remove/backup accordingly
|
||||
#
|
||||
#fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
}
|
||||
# PHP configuration end
|
||||
### End of PHP configuration part
|
||||
|
||||
# Very important security restriction
|
||||
# See https://forum.cheky.net/information-sur-message-avertissement-securite-t553-p1.html#p2127
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
"en": "Cheky package for YunoHost.",
|
||||
"fr": "Application Cheky pour YunoHost."
|
||||
},
|
||||
"version": "3.8.1~ynh2",
|
||||
"version": "4.1~ynh2",
|
||||
"url": "https://www.cheky.net",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"maintainer": {
|
||||
"name": "Gofannon",
|
||||
"email": "gofanon@riseup.net",
|
||||
"email": "gofannon@riseup.net",
|
||||
"url": ""
|
||||
},
|
||||
"previous_maintainers": [
|
||||
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
],
|
||||
"requirements": {
|
||||
"yunohost": ">> 2.6.4"
|
||||
"yunohost": ">> 2.7.14"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -6,12 +6,7 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
if [ ! -e _common.sh ]; then
|
||||
# Get the _common.sh file if it's not in the current directory
|
||||
cp ../settings/scripts/_common.sh ./_common.sh
|
||||
chmod a+rx _common.sh
|
||||
fi
|
||||
source _common.sh
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -61,11 +56,9 @@ ynh_mysql_dump_db "$db_name" > db.sql
|
|||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
# BACKUP LOGROTATE
|
||||
# ...
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/etc/logrotate.d/$app"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE CRON FILE
|
||||
#=================================================
|
||||
|
|
|
@ -143,6 +143,12 @@ db_pwd=$(ynh_app_setting_get $app mysqlpwd)
|
|||
# Installation with curl
|
||||
ynh_local_curl "/index.php?mod=install" "password=$password" "confirmPassword=$password" "type=db" "db[host]=localhost" "db[user]=$db_name" "db[password]=$db_pwd" "db[dbname]=$db_name"
|
||||
|
||||
# Remove the public access
|
||||
if [ $is_public -eq 0 ]
|
||||
then
|
||||
ynh_app_setting_delete $app skipped_uris
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
@ -154,21 +160,10 @@ chown -R root: $final_path
|
|||
# Only path that needs to be writable by cheky
|
||||
chown -R $app: $final_path/var
|
||||
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
#=================================================
|
||||
|
||||
# Use logrotate to manage application logfile(s)
|
||||
ynh_use_logrotate
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
||||
if [ $is_public -eq 0 ]
|
||||
then # Remove the public access
|
||||
ynh_app_setting_delete $app skipped_uris
|
||||
fi
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
|
|
|
@ -50,13 +50,6 @@ ynh_remove_nginx_config
|
|||
# Remove the dedicated php-fpm config
|
||||
ynh_remove_fpm_config
|
||||
|
||||
#=================================================
|
||||
# REMOVE LOGROTATE CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
# Remove the app-specific logrotate config
|
||||
ynh_remove_logrotate
|
||||
|
||||
#=================================================
|
||||
# CLOSE A PORT
|
||||
#=================================================
|
||||
|
|
|
@ -6,12 +6,7 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
if [ ! -e _common.sh ]; then
|
||||
# Get the _common.sh file if it's not in the current directory
|
||||
cp ../settings/scripts/_common.sh ./_common.sh
|
||||
chmod a+rx _common.sh
|
||||
fi
|
||||
source _common.sh
|
||||
source ../settings/scripts/_common.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
|
@ -92,12 +87,6 @@ ynh_restore_file "/etc/php5/fpm/conf.d/20-$app.ini"
|
|||
|
||||
ynh_restore_file "/etc/cron.d/$app"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE LOGROTATE CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_restore_file "/etc/logrotate.d/$app"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -108,13 +108,6 @@ ynh_add_fpm_config
|
|||
# Recalculate and store the config file checksum into the app settings
|
||||
#ynh_store_file_checksum "$final_path/CONFIG_FILE"
|
||||
|
||||
#=================================================
|
||||
# SETUP LOGROTATE
|
||||
#=================================================
|
||||
|
||||
# Use logrotate to manage app-specific logfile(s)
|
||||
ynh_use_logrotate --non-append
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
@ -130,10 +123,6 @@ chown -R $app: $final_path/var
|
|||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
||||
if [ $is_public -eq 0 ]
|
||||
then # Remove the public access
|
||||
ynh_app_setting_delete $app skipped_uris
|
||||
fi
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
|
|
Loading…
Add table
Reference in a new issue