diff --git a/conf/database.example.yml b/conf/database.example.yml index 7e213b2..588e8f6 100644 --- a/conf/database.example.yml +++ b/conf/database.example.yml @@ -1,7 +1,7 @@ production: adapter: postgresql host: localhost - encoding: unicode + encoding: utf8 database: yunobase pool: 5 username: yunouser diff --git a/conf/systemd.service b/conf/systemd.service index 2e68919..c5a3ef6 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,5 +1,5 @@ [Unit] -Description=Pia Backend +Description=Redmine Requires=network.target Requires=postgresql.service @@ -7,9 +7,9 @@ Requires=postgresql.service Type=simple User=root Group=users -WorkingDirectory=/opt/pia-back +WorkingDirectory=/opt/redmine Environment=RAILS_SERVE_STATIC_FILES=true -ExecStart=/bin/bash -c "/opt/pia-back/bin/rails s -e production -b 127.0.0.1 -p 3000" +ExecStart=/bin/bash -c "/opt/redmine/bin/rails s -e production -b 127.0.0.1 -p 3000" TimeoutSec=30 RestartSec=15s Restart=always diff --git a/scripts/install b/scripts/install index aa1478e..d5b6eed 100644 --- a/scripts/install +++ b/scripts/install @@ -47,7 +47,7 @@ app=$YNH_APP_INSTANCE_NAME ### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app". ### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app" -final_path=/var/www/$app +final_path=/opt/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" # Normalize the url path syntax @@ -144,14 +144,12 @@ ynh_setup_source "$final_path" #================================================= ynh_print_info "Install Redmine Conffiguration..." -rm /opt/pia-back/config/database.example.yml -cp -a ../conf/database.example.yml /opt/pia-back/config/database.yml -cp -a ../conf/pias_controller.rb /opt/pia-back/app/controllers/pias_controller.rb +cp -a ../conf/database.example.yml $final_path/config/database.yml -ynh_replace_string "2.5.3" "2.3.3" "/opt/pia-back/Gemfile" -ynh_replace_string "yunouser" "$db_name" "/opt/pia-back/config/database.yml" -ynh_replace_string "yunopass" "$db_pwd" "/opt/pia-back/config/database.yml" -ynh_replace_string "yunobase" "$db_name" "/opt/pia-back/config/database.yml" +#ynh_replace_string "2.5.3" "2.3.3" "/opt/redmine/Gemfile" +ynh_replace_string "yunouser" "$db_name" "$final_path/config/database.yml" +ynh_replace_string "yunopass" "$db_pwd" "$final_path/config/database.yml" +ynh_replace_string "yunobase" "$db_name" "$final_path/config/database.yml" #================================================= # COMPILE PIA BACK