From c4796ba7b211edf4c44a979360763a1eb2dac872 Mon Sep 17 00:00:00 2001 From: asandikci Date: Sun, 7 Jan 2024 16:09:18 +0300 Subject: [PATCH] cron mini bug fix --- manifest.toml | 2 +- scripts/install | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/manifest.toml b/manifest.toml index 4631d5e..5e20849 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Yurdle" description.en = "yurdle package" description.tr = "yurdle paketi" -version = "1.5~ynh1" +version = "1.5~ynh2" maintainers = ["asandikci"] diff --git a/scripts/install b/scripts/install index 43cd2fb..815c08d 100755 --- a/scripts/install +++ b/scripts/install @@ -159,12 +159,15 @@ chown -R $app:$app "$install_dir/src/" php -r "require '/var/www/$app/src/server.php'; updateRemoteData(); " chown $app:$app "$install_dir/data.toml" chmod 700 "$install_dir/data.toml" -echo "*/10 * * * * php -r \"require '/var/www/$app/src/server.php'; updateRemoteData(); \"" >>"/etc/cron.d/$app" +echo "*/10 * * * * yurdle /usr/bin/php8.2 -r \"require '/var/www/$app/src/server.php'; updateRemoteData(); \"" >>"/etc/cron.d/$app" php -r "require '/var/www/$app/src/server.php'; chooseTodayPerson(); " chown $app:$app "$install_dir/src/todays.php" chmod 700 "$install_dir/src/todays.php" -echo "0 0 * * * php -r \"require '/var/www/$app/src/server.php'; chooseTodayPerson(); \"" >>"/etc/cron.d/$app" +echo "0 0 * * * yurdle /usr/bin/php8.2 -r \"require '/var/www/$app/src/server.php'; chooseTodayPerson(); \"" >>"/etc/cron.d/$app" + +chmod 700 "/etc/cron.d/$app" +systemctl restart cron.service ### 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)