mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
create_witness_file to ynh_lxc_pc_witness_file_create
This commit is contained in:
parent
053f07b9e9
commit
cdcd0b6765
1 changed files with 15 additions and 15 deletions
|
@ -25,42 +25,42 @@ ynh_lxc_pc_exec () {
|
||||||
return $returncode
|
return $returncode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ynh_lxc_pc_witness_file_create () {
|
||||||
|
[ "$2" = "file" ] && local action="touch" || local action="mkdir -p"
|
||||||
|
RUN_INSIDE_LXC $action $1
|
||||||
|
}
|
||||||
|
|
||||||
ynh_lxc_pc_witness_files_set () {
|
ynh_lxc_pc_witness_files_set () {
|
||||||
# Create files to check if the remove script does not remove them accidentally
|
# Create files to check if the remove script does not remove them accidentally
|
||||||
log_debug "Create witness files..."
|
log_debug "Create witness files..."
|
||||||
|
|
||||||
create_witness_file () {
|
|
||||||
[ "$2" = "file" ] && local action="touch" || local action="mkdir -p"
|
|
||||||
RUN_INSIDE_LXC $action $1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Nginx conf
|
# Nginx conf
|
||||||
create_witness_file "/etc/nginx/conf.d/$DOMAIN.d/witnessfile.conf" file
|
ynh_lxc_pc_witness_file_create "/etc/nginx/conf.d/$DOMAIN.d/witnessfile.conf" file
|
||||||
create_witness_file "/etc/nginx/conf.d/$SUBDOMAIN.d/witnessfile.conf" file
|
ynh_lxc_pc_witness_file_create "/etc/nginx/conf.d/$SUBDOMAIN.d/witnessfile.conf" file
|
||||||
|
|
||||||
# /etc
|
# /etc
|
||||||
create_witness_file "/etc/witnessfile" file
|
ynh_lxc_pc_witness_file_create "/etc/witnessfile" file
|
||||||
|
|
||||||
# /opt directory
|
# /opt directory
|
||||||
create_witness_file "/opt/witnessdir" directory
|
ynh_lxc_pc_witness_file_create "/opt/witnessdir" directory
|
||||||
|
|
||||||
# /var/www directory
|
# /var/www directory
|
||||||
create_witness_file "/var/www/witnessdir" directory
|
ynh_lxc_pc_witness_file_create "/var/www/witnessdir" directory
|
||||||
|
|
||||||
# /home/yunohost.app/
|
# /home/yunohost.app/
|
||||||
create_witness_file "/home/yunohost.app/witnessdir" directory
|
ynh_lxc_pc_witness_file_create "/home/yunohost.app/witnessdir" directory
|
||||||
|
|
||||||
# /var/log
|
# /var/log
|
||||||
create_witness_file "/var/log/witnessfile" file
|
ynh_lxc_pc_witness_file_create "/var/log/witnessfile" file
|
||||||
|
|
||||||
# Config fpm
|
# Config fpm
|
||||||
create_witness_file "/etc/php/$DEFAULT_PHP_VERSION/fpm/pool.d/witnessfile.conf" file
|
ynh_lxc_pc_witness_file_create "/etc/php/$DEFAULT_PHP_VERSION/fpm/pool.d/witnessfile.conf" file
|
||||||
|
|
||||||
# Config logrotate
|
# Config logrotate
|
||||||
create_witness_file "/etc/logrotate.d/witnessfile" file
|
ynh_lxc_pc_witness_file_create "/etc/logrotate.d/witnessfile" file
|
||||||
|
|
||||||
# Config systemd
|
# Config systemd
|
||||||
create_witness_file "/etc/systemd/system/witnessfile.service" file
|
ynh_lxc_pc_witness_file_create "/etc/systemd/system/witnessfile.service" file
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
RUN_INSIDE_LXC mysqladmin --wait status > /dev/null 2>&1
|
RUN_INSIDE_LXC mysqladmin --wait status > /dev/null 2>&1
|
||||||
|
|
Loading…
Add table
Reference in a new issue