Skip to content

Instantly share code, notes, and snippets.

@circa10a
Last active March 10, 2022 15:48
Show Gist options
  • Select an option

  • Save circa10a/e6cfc673af9282d17dfb958ef6adabeb to your computer and use it in GitHub Desktop.

Select an option

Save circa10a/e6cfc673af9282d17dfb958ef6adabeb to your computer and use it in GitHub Desktop.

Revisions

  1. circa10a revised this gist Jan 29, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test.service
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,4 @@ Restart=always
    RestartSec=5

    [Install]
    WantedBy=multi-user.targey
    WantedBy=multi-user.target
  2. circa10a revised this gist Jan 29, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test.service
    Original file line number Diff line number Diff line change
    @@ -15,4 +15,4 @@ Restart=always
    RestartSec=5

    [Install]
    WantedBy=multi-user.targe
    WantedBy=multi-user.targey
  3. circa10a created this gist Oct 21, 2017.
    18 changes: 18 additions & 0 deletions test.service
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    #/etc/systemd/system/test.service
    [Unit]

    Description=Test Systemd Service

    [Service]
    ExecStartPre=/usr/bin/echo -e "\033[0;33m Pre start \033[0m"
    ExecStart=/usr/bin/sleep 10
    ExecStartPost=/usr/bin/echo -e "\033[0;33m Post start \033[0m"

    ExecStop=/usr/bin/pkill -f sleep
    ExecStopPost=/usr/bin/echo -e "\033[0;33m Post stop \033[0m"

    Restart=always
    RestartSec=5

    [Install]
    WantedBy=multi-user.targe