Skip to content

Instantly share code, notes, and snippets.

@nqxcode
Last active March 27, 2020 07:54
Show Gist options
  • Save nqxcode/9e929b7c5ce1b76fed217083a9c00883 to your computer and use it in GitHub Desktop.
Save nqxcode/9e929b7c5ce1b76fed217083a9c00883 to your computer and use it in GitHub Desktop.
Пример сервиса systemd
[Unit]
Description=Start vnc server at startup
After=network.target
[Service]
Type=forking
User=diol
Group=diol
OOMScoreAdjust=-500
WorkingDirectory=/home/diol
ExecStartPre=/usr/bin/vncserver -kill :612 > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -localhost no -depth 24 -geometry 1920x1080 :612
ExecStop=/usr/bin/vncserver -kill :612
Restart=on-failure
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment