diff --git a/scripts/install b/scripts/install index c205524..4c6d11a 100755 --- a/scripts/install +++ b/scripts/install @@ -153,9 +153,11 @@ ynh_add_config --template="../conf/config.php" --destination="$install_dir/confi chmod 400 "$install_dir/config.php" chown $app:$app "$install_dir/config.php" -chmod -R 600 "$install_dir/src/" +chmod -R 700 "$install_dir/src/" chown -R $app:$app "$install_dir/src/" +crontab -l | { cat; echo "*/10 * * * * php -r \"require '/var/www/$app/src/server.php'; updateRemoteData(); \""; } | crontab - + ### For more complex cases where you want to replace stuff using regexes, ### you shoud rely on ynh_replace_string (which is basically a wrapper for sed) ### When doing so, you also need to manually call ynh_store_file_checksum diff --git a/scripts/upgrade b/scripts/upgrade index 4c14e2f..9423b22 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -120,6 +120,9 @@ ynh_add_config --template="../conf/config.php" --destination="$install_dir/confi chmod 400 "$install_dir/config.php" chown $app:$app "$install_dir/config.php" +chmod -R 700 "$install_dir/src/" +chown -R $app:$app "$install_dir/src/" + ### For more complex cases where you want to replace stuff using regexes, ### you shoud rely on ynh_replace_string (which is basically a wrapper for sed) ### When doing so, you also need to manually call ynh_store_file_checksum