Update scripts/upgrade
This commit is contained in:
parent
a625696211
commit
300a1469af
1 changed files with 5 additions and 8 deletions
|
@ -70,13 +70,14 @@ ynh_script_progression "Updating $app's configuration files..."
|
||||||
### The file will automatically be backed-up if it's found to be manually modified (because
|
### The file will automatically be backed-up if it's found to be manually modified (because
|
||||||
### ynh_config_add keeps track of the file's checksum)
|
### ynh_config_add keeps track of the file's checksum)
|
||||||
|
|
||||||
ynh_config_add --template="some_config_file" --destination="$install_dir/some_config_file"
|
ynh_config_add --template="run.sh" --destination="$install_dir/run.sh"
|
||||||
|
|
||||||
# FIXME: this should be handled by the core in the future
|
# FIXME: this should be handled by the core in the future
|
||||||
### You may need to use chmod 600 instead of 400,
|
### You may need to use chmod 600 instead of 400,
|
||||||
### for example if the app is expected to be able to modify its own config
|
### for example if the app is expected to be able to modify its own config
|
||||||
chmod 400 "$install_dir/some_config_file"
|
chmod +x "$install_dir/run.sh"
|
||||||
chown "$app:$app" "$install_dir/some_config_file"
|
chmod 400 "$install_dir/run.sh"
|
||||||
|
chown "$app:$app" "$install_dir/run.sh"
|
||||||
|
|
||||||
### For more complex cases where you want to replace stuff using regexes,
|
### For more complex cases where you want to replace stuff using regexes,
|
||||||
### you shoud rely on ynh_replace (which is basically a wrapper for sed)
|
### you shoud rely on ynh_replace (which is basically a wrapper for sed)
|
||||||
|
@ -92,18 +93,14 @@ ynh_script_progression "Upgrading system configurations related to $app..."
|
||||||
|
|
||||||
### This should be a literal copypaste of what happened in the install's "System configuration" section
|
### This should be a literal copypaste of what happened in the install's "System configuration" section
|
||||||
|
|
||||||
ynh_config_add_phpfpm
|
|
||||||
|
|
||||||
ynh_config_add_nginx
|
ynh_config_add_nginx
|
||||||
|
|
||||||
ynh_config_add_systemd
|
ynh_config_add_systemd
|
||||||
|
|
||||||
yunohost service add "$app" --description="A short description of the app" --log="/var/log/$app/$app.log"
|
yunohost service add "$app" --description="A modern and self-hosted take on file uploading services that can handle anything you throw at it thanks to it's robust and fast API, chunked uploads support and more." --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
ynh_config_add_logrotate
|
ynh_config_add_logrotate
|
||||||
|
|
||||||
ynh_config_add_fail2ban --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue