1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'manifests/handler.pp', line 1
class twlight::handler inherits twlight {
# Import Backup if available
exec { 'mysql_import':
command => "/bin/bash ${root_dir}/bin/twlight_restore.sh ${restore_file}",
logoutput => true,
onlyif => "/usr/bin/stat ${restore_file}",
}
# Reload nginx
exec { 'nginx_reload':
command => '/usr/sbin/nginx -t && /bin/systemctl reload nginx',
refreshonly => true,
require => Service['nginx'],
}
# Configure virtual environment
exec { 'virtualenv_update':
command => "/bin/bash ${root_dir}/bin/twlight_update_code.sh init",
}
}
|