Skip to content

Instantly share code, notes, and snippets.

@Sagleft
Created November 11, 2022 15:47
Show Gist options
  • Save Sagleft/62d71f81ecf3fe23dce624fe182669cb to your computer and use it in GitHub Desktop.
Save Sagleft/62d71f81ecf3fe23dce624fe182669cb to your computer and use it in GitHub Desktop.
yum update -y
yum install -y libxkbcommon-x11.x86_64 libGL pulseaudio-libs-glib2 libXi libSM libXrender fontconfig libxcb xcb-util-image xcb-util-renderutil gstreamer1-plugins-base-devel mesa-dri-drivers mesa-libGL mesa-libGLU libXcomposite libwayland-cursor libwayland-egl xcb-util-wm xcb-util-keysyms unzip nano git wget
cd /home
cat << EOF >> update_utopia.sh
wget https://update.u.is/downloads/linux/utopia-latest.x86_64.rpm
rpm -ivh --replacepkgs utopia-latest.x86_64.rpm
EOF
sh update_utopia.sh
cat << EOF >> utopia.cfg
[General]
apiEnabled=true
apiHTTPEnabled=true
apiHTTPSEnabled=false
apiHelpEnabled=false
apiPort=22824
apiSslPort=10100
apiUserTokens=2FCD80B3113377A7241567A7E8FA637B
applicationLastOpenedPath=account.db
userDatabase=/home/account.db
userPassword=password
EOF
touch /etc/systemd/system/startopia.service
chmod 664 /etc/systemd/system/startopia.service
cat << EOF >> /etc/systemd/system/startopia.service
[Unit]
Description=Utopia Service
After=network.target
[Service]
Type=idle
WorkingDirectory=/opt/utopia/messenger
ExecStart=/opt/utopia/messenger/utopia --headless --configPath=/home/utopia.cfg
Restart=on-failure
RestartSec=3s
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable startopia.service
systemctl start startopia.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment