|
|
@ -112,7 +112,7 @@ echo_header "Copy over application files" |
|
|
|
mkdir -vp "$install_dir" |
|
|
|
mkdir -vp "$install_dir" |
|
|
|
cp -rv "$script_dir/$default_app_name/." "$install_dir" |
|
|
|
cp -rv "$script_dir/$default_app_name/." "$install_dir" |
|
|
|
sed -i "s+^app_name=.*+app_name='${flask_module_name}'+g" "$install_dir/run.sh" |
|
|
|
sed -i "s+^app_name=.*+app_name='${flask_module_name}'+g" "$install_dir/run.sh" |
|
|
|
sed -i "s+confuse.Configuration(*, __name__)+confuse.Configuration('$app_name', __name__)'+g" "$install_dir/{$flask_module_name}/__init__.py" |
|
|
|
sed -i "s+confuse.Configuration(*, __name__)+confuse.Configuration('$app_name', __name__)'+g" "$install_dir/$flask_module_name/__init__.py" |
|
|
|
|
|
|
|
|
|
|
|
cp -v "$script_dir/installation-files/uninstall.sh" "$install_dir" |
|
|
|
cp -v "$script_dir/installation-files/uninstall.sh" "$install_dir" |
|
|
|
sed -i "s+^app_name=.*+app_name='${app_name}'+g" "$install_dir/uninstall.sh" |
|
|
|
sed -i "s+^app_name=.*+app_name='${app_name}'+g" "$install_dir/uninstall.sh" |
|
|
@ -122,10 +122,12 @@ cp -v "$script_dir/version" "$install_dir" |
|
|
|
cp -v "$script_dir/README.md" "$install_dir" |
|
|
|
cp -v "$script_dir/README.md" "$install_dir" |
|
|
|
|
|
|
|
|
|
|
|
mkdir -vp "/etc/$app_name" |
|
|
|
mkdir -vp "/etc/$app_name" |
|
|
|
cp -v "$script_dir/$default_app_name/config_example.yaml" "/etc/$app_name/config.yaml" |
|
|
|
cp -v "$script_dir/installation-files/config_example.yaml" "/etc/$app_name/config.yaml" |
|
|
|
sed -i "s/^port =.*/port = $internal_port/g" "$install_dir/config.yaml" |
|
|
|
sed -i "s/^port =.*/port = $internal_port/g" "$install_dir/$flask_module_name/config_default.yaml" |
|
|
|
sed -i "s+^logfile :.*+logfile : $logging_dir/reports.log+g" "$install_dir/config.yaml" |
|
|
|
sed -i "s+^logfile :.*+logfile : $logging_dir/reports.log+g" "$install_dir/$flask_module_name/config_default.yaml" |
|
|
|
sed -i "s+^errorfile :.*+errorfile : $logging_dir/error.log+g" "$install_dir/config.yaml" |
|
|
|
sed -i "s+^errorfile :.*+errorfile : $logging_dir/error.log+g" "$install_dir/$flask_module_name/config_default.yaml" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cp -v "$script_dir/installation-files/projects_example.yaml" "/etc/$app_name/projects.yaml" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo_header "Copy over and enable apache vhost" |
|
|
|
echo_header "Copy over and enable apache vhost" |
|
|
@ -139,7 +141,7 @@ if [ "$use_wsgi" = 'true' ]; then |
|
|
|
|
|
|
|
|
|
|
|
echo_header "Installing wsgi-script" |
|
|
|
echo_header "Installing wsgi-script" |
|
|
|
mkdir -vp "/var/www/wsgi-scripts" |
|
|
|
mkdir -vp "/var/www/wsgi-scripts" |
|
|
|
cp -v "$script_dir/installation-files/$default_app_name.wsgi" "/var/www/wsgi-scripts/app_name.wsgi" |
|
|
|
cp -v "$script_dir/installation-files/$default_app_name.wsgi" "/var/www/wsgi-scripts/$app_name.wsgi" |
|
|
|
sed -i "s+INSTALLDIR+$install_dir+g" "/var/www/wsgi-scripts/$app_name.wsgi" |
|
|
|
sed -i "s+INSTALLDIR+$install_dir+g" "/var/www/wsgi-scripts/$app_name.wsgi" |
|
|
|
sed -i "s/APPNAME/$flask_module_name/g" "/var/www/wsgi-scripts/$app_name.wsgi" |
|
|
|
sed -i "s/APPNAME/$flask_module_name/g" "/var/www/wsgi-scripts/$app_name.wsgi" |
|
|
|
else |
|
|
|
else |
|
|
|