mirror of
https://github.com/YunoHost-Apps/invoiceninja5_ynh.git
synced 2024-09-03 19:26:23 +02:00
Add_config
This commit is contained in:
parent
dfc16e1ee2
commit
442fdb0180
4 changed files with 4 additions and 21 deletions
1
conf/cron
Normal file
1
conf/cron
Normal file
|
@ -0,0 +1 @@
|
||||||
|
* * * * * __APP__ /usr/bin/php__PHPVERSION__ __FINALPATH__/artisan schedule:run >> /dev/null 2>&1
|
|
@ -1 +0,0 @@
|
||||||
* * * * * __USER__ /usr/bin/php__YNH_PHP_VERSION__ __DESTDIR__/artisan schedule:run >> /dev/null 2>&1
|
|
|
@ -167,14 +167,9 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding a cron job..."
|
ynh_script_progression --message="Adding a cron job..."
|
||||||
|
|
||||||
cron_path="/etc/cron.d/$app"
|
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||||
cp -a ../conf/invoiceninja.cron "$cron_path"
|
chown root: "/etc/cron.d/$app"
|
||||||
chown root: "$cron_path"
|
chmod 644 "/etc/cron.d/$app"
|
||||||
chmod 644 "$cron_path"
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="$cron_path"
|
|
||||||
ynh_replace_string --match_string="__DESTDIR__" --replace_string="$final_path" --target_file="$cron_path"
|
|
||||||
ynh_replace_string --match_string="__YNH_PHP_VERSION__" --replace_string="$YNH_PHP_VERSION" --target_file="$cron_path"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
|
|
|
@ -62,18 +62,6 @@ ynh_clean_setup () {
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK THE PATH
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Normalize the URL path syntax
|
|
||||||
# N.B. : this is for app installations before YunoHost 2.7
|
|
||||||
# where this value might be something like /foo/ or foo/
|
|
||||||
# instead of /foo ....
|
|
||||||
# If nobody installed your app before 2.7, then you may
|
|
||||||
# safely remove this line
|
|
||||||
path_url=$(ynh_normalize_url_path --path_url=$path_url)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue