27 lines
482 B
Bash
27 lines
482 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
_deploy_service_file() {
|
||
|
cat <<EOF > "$1"
|
||
|
[Unit]
|
||
|
Description=Autostart several tools and services
|
||
|
StartLimitIntervalSec=120
|
||
|
StartLimitBurst=10
|
||
|
|
||
|
[Service]
|
||
|
KillMode=process
|
||
|
ExecStart=/bin/sh -c ". \$HOME/.profile && autostart-manage exec '%i'"
|
||
|
Restart=on-failure
|
||
|
RestartSec=5s
|
||
|
EOF
|
||
|
}
|
||
|
|
||
|
_deploy_target_file() {
|
||
|
cat <<EOF > "$1"
|
||
|
[Unit]
|
||
|
Description=Current graphical user session
|
||
|
Documentation=man:systemd.special(7)
|
||
|
RefuseManualStart=no
|
||
|
StopWhenUnneeded=no
|
||
|
EOF
|
||
|
}
|