File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -35,19 +35,22 @@ function update_script() {
3535
3636 msg_info " Updating ${APP} to ${RELEASE} "
3737 cp /opt/kimai/.env /opt/.env
38+ [ -f /opt/kimai/config/packages/local.yaml ] && cp /opt/kimai/config/packages/local.yaml /opt/local.yaml
3839 rm -rf /opt/kimai
3940 wget -q " https://github.com/kimai/kimai/archive/refs/tags/${RELEASE} .zip"
4041 unzip -q ${RELEASE} .zip
4142 mv kimai-${RELEASE} /opt/kimai
4243 mv /opt/.env /opt/kimai/.env
44+ [ -f /opt/local.yaml ] && mv /opt/local.yaml /opt/kimai/config/packages/local.yaml
4345 cd /opt/kimai
4446 $STD composer install --no-dev --optimize-autoloader
4547 $STD bin/console kimai:update
4648 chown -R :www-data .
4749 chmod -R g+r .
4850 chmod -R g+rw var/
49- sudo chown -R www-data:www-data /opt/kimai
50- sudo chmod -R 755 /opt/kimai
51+ chmod -R 777 /opt/kimai/var/
52+ chown -R www-data:www-data /opt/kimai
53+ chmod -R 755 /opt/kimai
5154 echo " ${RELEASE} " > /opt/${APP} _version.txt
5255 msg_ok " Updated ${APP} to ${RELEASE} "
5356
@@ -72,4 +75,4 @@ description
7275msg_ok " Completed Successfully!\n"
7376echo -e " ${CREATING}${GN}${APP} setup has been successfully initialized!${CL} "
7477echo -e " ${INFO}${YW} Access it using the following URL:${CL} "
75- echo -e " ${TAB}${GATEWAY}${BGN} http://${IP}${CL} "
78+ echo -e " ${TAB}${GATEWAY}${BGN} http://${IP}${CL} "
Original file line number Diff line number Diff line change @@ -74,8 +74,9 @@ $STD bin/console kimai:install -n
7474chown -R :www-data /opt/*
7575chmod -R g+r /opt/*
7676chmod -R g+rw /opt/*
77- sudo chown -R www-data:www-data /opt/*
78- sudo chmod -R 755 /opt/*
77+ chown -R www-data:www-data /opt/*
78+ chmod -R 755 /opt/*
79+ chmod -R 777 /opt/kimai/var/
7980$STD expect << EOF
8081set timeout -1
8182log_user 0
@@ -88,6 +89,19 @@ send "helper-scripts.com\r"
8889expect eof
8990EOF
9091$STD composer update --no-interaction
92+ cat << EOF >/opt/kimai/config/packages/local.yaml
93+ kimai:
94+ timesheet:
95+ rounding:
96+ default:
97+ begin: 15
98+ end: 15
99+
100+ admin_lte:
101+ options:
102+ default_avatar: build/apple-touch-icon.png
103+ EOF
104+
91105echo " ${RELEASE} " > " /opt/${APPLICATION} _version.txt"
92106msg_ok " Installed Kimai"
93107
You can’t perform that action at this time.
0 commit comments