update permissions and crontab

This commit is contained in:
Aliberk Sandıkçı 2024-01-07 12:47:50 +03:00
parent d61c4e7e6a
commit 3d1d93cc30
Signed by: asandikci
GPG Key ID: 25C67A03B5666BC1
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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