mirror of
				https://github.com/community-scripts/ProxmoxVE.git
				synced 2025-11-04 02:12:49 +00:00 
			
		
		
		
	Kimai: add local.yaml & fix path permissions (#2646)
* Update kimai-install.sh * Update kimai.sh * Update kimai.sh
This commit is contained in:
		@@ -35,19 +35,22 @@ function update_script() {
 | 
			
		||||
 | 
			
		||||
    msg_info "Updating ${APP} to ${RELEASE}"
 | 
			
		||||
    cp /opt/kimai/.env /opt/.env
 | 
			
		||||
    [ -f /opt/kimai/config/packages/local.yaml ] && cp /opt/kimai/config/packages/local.yaml /opt/local.yaml
 | 
			
		||||
    rm -rf /opt/kimai
 | 
			
		||||
    wget -q "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip"
 | 
			
		||||
    unzip -q ${RELEASE}.zip
 | 
			
		||||
    mv kimai-${RELEASE} /opt/kimai
 | 
			
		||||
    mv /opt/.env /opt/kimai/.env
 | 
			
		||||
    [ -f /opt/local.yaml ] && mv /opt/local.yaml /opt/kimai/config/packages/local.yaml
 | 
			
		||||
    cd /opt/kimai
 | 
			
		||||
    $STD composer install --no-dev --optimize-autoloader
 | 
			
		||||
    $STD bin/console kimai:update
 | 
			
		||||
    chown -R :www-data .
 | 
			
		||||
    chmod -R g+r .
 | 
			
		||||
    chmod -R g+rw var/
 | 
			
		||||
    sudo chown -R www-data:www-data /opt/kimai
 | 
			
		||||
    sudo chmod -R 755 /opt/kimai
 | 
			
		||||
    chmod -R 777 /opt/kimai/var/ 
 | 
			
		||||
    chown -R www-data:www-data /opt/kimai
 | 
			
		||||
    chmod -R 755 /opt/kimai
 | 
			
		||||
    echo "${RELEASE}" >/opt/${APP}_version.txt
 | 
			
		||||
    msg_ok "Updated ${APP} to ${RELEASE}"
 | 
			
		||||
 | 
			
		||||
@@ -72,4 +75,4 @@ description
 | 
			
		||||
msg_ok "Completed Successfully!\n"
 | 
			
		||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
 | 
			
		||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
 | 
			
		||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
 | 
			
		||||
 
 | 
			
		||||
@@ -74,8 +74,9 @@ $STD bin/console kimai:install -n
 | 
			
		||||
chown -R :www-data /opt/*
 | 
			
		||||
chmod -R g+r /opt/*
 | 
			
		||||
chmod -R g+rw /opt/*
 | 
			
		||||
sudo chown -R www-data:www-data /opt/*
 | 
			
		||||
sudo chmod -R 755 /opt/*
 | 
			
		||||
chown -R www-data:www-data /opt/*
 | 
			
		||||
chmod -R 755 /opt/*
 | 
			
		||||
chmod -R 777 /opt/kimai/var/ 
 | 
			
		||||
$STD expect <<EOF
 | 
			
		||||
set timeout -1
 | 
			
		||||
log_user 0
 | 
			
		||||
@@ -88,6 +89,19 @@ send "helper-scripts.com\r"
 | 
			
		||||
expect eof
 | 
			
		||||
EOF
 | 
			
		||||
$STD composer update --no-interaction
 | 
			
		||||
cat <<EOF >/opt/kimai/config/packages/local.yaml
 | 
			
		||||
kimai:
 | 
			
		||||
    timesheet:
 | 
			
		||||
        rounding:
 | 
			
		||||
            default:
 | 
			
		||||
                begin: 15
 | 
			
		||||
                end: 15
 | 
			
		||||
 | 
			
		||||
admin_lte:
 | 
			
		||||
    options:
 | 
			
		||||
        default_avatar: build/apple-touch-icon.png
 | 
			
		||||
EOF
 | 
			
		||||
 | 
			
		||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
 | 
			
		||||
msg_ok "Installed Kimai"
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user