Systemd to upstart

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I got a systemd service and I am still using Ubuntu 14.04 for various reasons. As you probably know ubuntu uses upstart and not systemd. Can you guys help me convert this systemd service to an upstart service ?



[Unit]
Description=Conan - dong sliders to MAX
After=syslog.target network.target

[Service]
ExecStart=/home/steam/exiles/start_conan.sh
User=steam
Type=simple
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target









share|improve this question
























  • You can read the Getting Started provided by the upstart developer. This will help you for sure.

    – ckruczek
    Mar 1 '17 at 7:48











  • Also, as an aside, what with the early access and no dedicated linux server available yet this probably isn't the best time to try and set up an Exiles server. I've tried, and it kind of works, but things are sort of messy still.

    – Shadur
    Mar 1 '17 at 8:48











  • I thought 14.04 had sysVinit, too. So just copy /etc/init.d/skeleton to /etc/init.d/myjob and edit the start) and restart). Put /home/steam/exiles/start_conan.sh` in start) and stop;sleep 42;start in restart). Then run update-rc.d defaults myjob if I remember correctly.

    – Michael D.
    Mar 1 '17 at 8:54











  • @Shadur It's more or less testing. Nothing serious planned yet, but we have some ressources left on our server. Michael Thanks, will try that out

    – SaeSi
    Mar 1 '17 at 9:03












  • I strongly urge you to consider upgrading. 14.04 is no longer supported, so you will be facing many issues going forward.

    – terdon
    Mar 1 '17 at 9:15

















1















I got a systemd service and I am still using Ubuntu 14.04 for various reasons. As you probably know ubuntu uses upstart and not systemd. Can you guys help me convert this systemd service to an upstart service ?



[Unit]
Description=Conan - dong sliders to MAX
After=syslog.target network.target

[Service]
ExecStart=/home/steam/exiles/start_conan.sh
User=steam
Type=simple
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target









share|improve this question
























  • You can read the Getting Started provided by the upstart developer. This will help you for sure.

    – ckruczek
    Mar 1 '17 at 7:48











  • Also, as an aside, what with the early access and no dedicated linux server available yet this probably isn't the best time to try and set up an Exiles server. I've tried, and it kind of works, but things are sort of messy still.

    – Shadur
    Mar 1 '17 at 8:48











  • I thought 14.04 had sysVinit, too. So just copy /etc/init.d/skeleton to /etc/init.d/myjob and edit the start) and restart). Put /home/steam/exiles/start_conan.sh` in start) and stop;sleep 42;start in restart). Then run update-rc.d defaults myjob if I remember correctly.

    – Michael D.
    Mar 1 '17 at 8:54











  • @Shadur It's more or less testing. Nothing serious planned yet, but we have some ressources left on our server. Michael Thanks, will try that out

    – SaeSi
    Mar 1 '17 at 9:03












  • I strongly urge you to consider upgrading. 14.04 is no longer supported, so you will be facing many issues going forward.

    – terdon
    Mar 1 '17 at 9:15













1












1








1








I got a systemd service and I am still using Ubuntu 14.04 for various reasons. As you probably know ubuntu uses upstart and not systemd. Can you guys help me convert this systemd service to an upstart service ?



[Unit]
Description=Conan - dong sliders to MAX
After=syslog.target network.target

[Service]
ExecStart=/home/steam/exiles/start_conan.sh
User=steam
Type=simple
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target









share|improve this question
















I got a systemd service and I am still using Ubuntu 14.04 for various reasons. As you probably know ubuntu uses upstart and not systemd. Can you guys help me convert this systemd service to an upstart service ?



[Unit]
Description=Conan - dong sliders to MAX
After=syslog.target network.target

[Service]
ExecStart=/home/steam/exiles/start_conan.sh
User=steam
Type=simple
Restart=on-failure
RestartSec=42s

[Install]
WantedBy=multi-user.target






linux ubuntu systemd upstart






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 18 at 3:13









Rui F Ribeiro

42.1k1484142




42.1k1484142










asked Mar 1 '17 at 7:39









SaeSiSaeSi

154




154












  • You can read the Getting Started provided by the upstart developer. This will help you for sure.

    – ckruczek
    Mar 1 '17 at 7:48











  • Also, as an aside, what with the early access and no dedicated linux server available yet this probably isn't the best time to try and set up an Exiles server. I've tried, and it kind of works, but things are sort of messy still.

    – Shadur
    Mar 1 '17 at 8:48











  • I thought 14.04 had sysVinit, too. So just copy /etc/init.d/skeleton to /etc/init.d/myjob and edit the start) and restart). Put /home/steam/exiles/start_conan.sh` in start) and stop;sleep 42;start in restart). Then run update-rc.d defaults myjob if I remember correctly.

    – Michael D.
    Mar 1 '17 at 8:54











  • @Shadur It's more or less testing. Nothing serious planned yet, but we have some ressources left on our server. Michael Thanks, will try that out

    – SaeSi
    Mar 1 '17 at 9:03












  • I strongly urge you to consider upgrading. 14.04 is no longer supported, so you will be facing many issues going forward.

    – terdon
    Mar 1 '17 at 9:15

















  • You can read the Getting Started provided by the upstart developer. This will help you for sure.

    – ckruczek
    Mar 1 '17 at 7:48











  • Also, as an aside, what with the early access and no dedicated linux server available yet this probably isn't the best time to try and set up an Exiles server. I've tried, and it kind of works, but things are sort of messy still.

    – Shadur
    Mar 1 '17 at 8:48











  • I thought 14.04 had sysVinit, too. So just copy /etc/init.d/skeleton to /etc/init.d/myjob and edit the start) and restart). Put /home/steam/exiles/start_conan.sh` in start) and stop;sleep 42;start in restart). Then run update-rc.d defaults myjob if I remember correctly.

    – Michael D.
    Mar 1 '17 at 8:54











  • @Shadur It's more or less testing. Nothing serious planned yet, but we have some ressources left on our server. Michael Thanks, will try that out

    – SaeSi
    Mar 1 '17 at 9:03












  • I strongly urge you to consider upgrading. 14.04 is no longer supported, so you will be facing many issues going forward.

    – terdon
    Mar 1 '17 at 9:15
















You can read the Getting Started provided by the upstart developer. This will help you for sure.

– ckruczek
Mar 1 '17 at 7:48





You can read the Getting Started provided by the upstart developer. This will help you for sure.

– ckruczek
Mar 1 '17 at 7:48













Also, as an aside, what with the early access and no dedicated linux server available yet this probably isn't the best time to try and set up an Exiles server. I've tried, and it kind of works, but things are sort of messy still.

– Shadur
Mar 1 '17 at 8:48





Also, as an aside, what with the early access and no dedicated linux server available yet this probably isn't the best time to try and set up an Exiles server. I've tried, and it kind of works, but things are sort of messy still.

– Shadur
Mar 1 '17 at 8:48













I thought 14.04 had sysVinit, too. So just copy /etc/init.d/skeleton to /etc/init.d/myjob and edit the start) and restart). Put /home/steam/exiles/start_conan.sh` in start) and stop;sleep 42;start in restart). Then run update-rc.d defaults myjob if I remember correctly.

– Michael D.
Mar 1 '17 at 8:54





I thought 14.04 had sysVinit, too. So just copy /etc/init.d/skeleton to /etc/init.d/myjob and edit the start) and restart). Put /home/steam/exiles/start_conan.sh` in start) and stop;sleep 42;start in restart). Then run update-rc.d defaults myjob if I remember correctly.

– Michael D.
Mar 1 '17 at 8:54













@Shadur It's more or less testing. Nothing serious planned yet, but we have some ressources left on our server. Michael Thanks, will try that out

– SaeSi
Mar 1 '17 at 9:03






@Shadur It's more or less testing. Nothing serious planned yet, but we have some ressources left on our server. Michael Thanks, will try that out

– SaeSi
Mar 1 '17 at 9:03














I strongly urge you to consider upgrading. 14.04 is no longer supported, so you will be facing many issues going forward.

– terdon
Mar 1 '17 at 9:15





I strongly urge you to consider upgrading. 14.04 is no longer supported, so you will be facing many issues going forward.

– terdon
Mar 1 '17 at 9:15










1 Answer
1






active

oldest

votes


















1














As root:



  • Save the following text as /etc/init.d/conan.

  • Set executable flag chmod +x /etc/init.d/conan.

  • Try to run it: /etc/init.d/conan start

  • all good? add it to the runlevels update-rc.d conan defaults


#! /bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="conan service"
NAME=conan
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS="--options args"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/init/vars.sh
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
export DISPLAY=:0
export WINEARCH=win64
export WINEPREFIX=/home/steam/.wine64
xvfb-run --auto-servernu m--server-args='-screen 0 640x480x24:32' wine /home/steam/exiles/common/Conan/ConanSandboxServer.exe -log -QueryPort=27055 &
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
wineserver -k
#wineserver -k9
;;
status)
[ $(pgrep -f wine | wc -l) -gt 0 ] && log_daemon_msg "is running" || log_daemon_msg "not running"
;;
restart)
stop
sleep 2
start
;;
*)
echo "Usage: $SCRIPTNAME stop" >&2
exit 3
;;
esac






share|improve this answer























  • Thanks for your help. One last question, how do I start this script in a new screen ? Sorry for all the "stupid" questions but the whole init thing is totally new for me. I was glad a few days ago to write a simple shell script but I cannot quite connect the dots yet :/

    – SaeSi
    Mar 1 '17 at 11:51












  • Screen as in Terminal? gnu.org/software/screen/manual/screen.html

    – Michael D.
    Mar 1 '17 at 13:13











  • This might work, but it's not an Upstart script, it's a SysVinit script.

    – Mark Stosberg
    Mar 1 '17 at 13:50











  • @MarkStosberg yes, check 3rd comment below question.

    – Michael D.
    Mar 1 '17 at 13:56











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f348325%2fsystemd-to-upstart%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














As root:



  • Save the following text as /etc/init.d/conan.

  • Set executable flag chmod +x /etc/init.d/conan.

  • Try to run it: /etc/init.d/conan start

  • all good? add it to the runlevels update-rc.d conan defaults


#! /bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="conan service"
NAME=conan
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS="--options args"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/init/vars.sh
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
export DISPLAY=:0
export WINEARCH=win64
export WINEPREFIX=/home/steam/.wine64
xvfb-run --auto-servernu m--server-args='-screen 0 640x480x24:32' wine /home/steam/exiles/common/Conan/ConanSandboxServer.exe -log -QueryPort=27055 &
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
wineserver -k
#wineserver -k9
;;
status)
[ $(pgrep -f wine | wc -l) -gt 0 ] && log_daemon_msg "is running" || log_daemon_msg "not running"
;;
restart)
stop
sleep 2
start
;;
*)
echo "Usage: $SCRIPTNAME stop" >&2
exit 3
;;
esac






share|improve this answer























  • Thanks for your help. One last question, how do I start this script in a new screen ? Sorry for all the "stupid" questions but the whole init thing is totally new for me. I was glad a few days ago to write a simple shell script but I cannot quite connect the dots yet :/

    – SaeSi
    Mar 1 '17 at 11:51












  • Screen as in Terminal? gnu.org/software/screen/manual/screen.html

    – Michael D.
    Mar 1 '17 at 13:13











  • This might work, but it's not an Upstart script, it's a SysVinit script.

    – Mark Stosberg
    Mar 1 '17 at 13:50











  • @MarkStosberg yes, check 3rd comment below question.

    – Michael D.
    Mar 1 '17 at 13:56















1














As root:



  • Save the following text as /etc/init.d/conan.

  • Set executable flag chmod +x /etc/init.d/conan.

  • Try to run it: /etc/init.d/conan start

  • all good? add it to the runlevels update-rc.d conan defaults


#! /bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="conan service"
NAME=conan
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS="--options args"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/init/vars.sh
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
export DISPLAY=:0
export WINEARCH=win64
export WINEPREFIX=/home/steam/.wine64
xvfb-run --auto-servernu m--server-args='-screen 0 640x480x24:32' wine /home/steam/exiles/common/Conan/ConanSandboxServer.exe -log -QueryPort=27055 &
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
wineserver -k
#wineserver -k9
;;
status)
[ $(pgrep -f wine | wc -l) -gt 0 ] && log_daemon_msg "is running" || log_daemon_msg "not running"
;;
restart)
stop
sleep 2
start
;;
*)
echo "Usage: $SCRIPTNAME stop" >&2
exit 3
;;
esac






share|improve this answer























  • Thanks for your help. One last question, how do I start this script in a new screen ? Sorry for all the "stupid" questions but the whole init thing is totally new for me. I was glad a few days ago to write a simple shell script but I cannot quite connect the dots yet :/

    – SaeSi
    Mar 1 '17 at 11:51












  • Screen as in Terminal? gnu.org/software/screen/manual/screen.html

    – Michael D.
    Mar 1 '17 at 13:13











  • This might work, but it's not an Upstart script, it's a SysVinit script.

    – Mark Stosberg
    Mar 1 '17 at 13:50











  • @MarkStosberg yes, check 3rd comment below question.

    – Michael D.
    Mar 1 '17 at 13:56













1












1








1







As root:



  • Save the following text as /etc/init.d/conan.

  • Set executable flag chmod +x /etc/init.d/conan.

  • Try to run it: /etc/init.d/conan start

  • all good? add it to the runlevels update-rc.d conan defaults


#! /bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="conan service"
NAME=conan
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS="--options args"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/init/vars.sh
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
export DISPLAY=:0
export WINEARCH=win64
export WINEPREFIX=/home/steam/.wine64
xvfb-run --auto-servernu m--server-args='-screen 0 640x480x24:32' wine /home/steam/exiles/common/Conan/ConanSandboxServer.exe -log -QueryPort=27055 &
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
wineserver -k
#wineserver -k9
;;
status)
[ $(pgrep -f wine | wc -l) -gt 0 ] && log_daemon_msg "is running" || log_daemon_msg "not running"
;;
restart)
stop
sleep 2
start
;;
*)
echo "Usage: $SCRIPTNAME stop" >&2
exit 3
;;
esac






share|improve this answer













As root:



  • Save the following text as /etc/init.d/conan.

  • Set executable flag chmod +x /etc/init.d/conan.

  • Try to run it: /etc/init.d/conan start

  • all good? add it to the runlevels update-rc.d conan defaults


#! /bin/sh
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="conan service"
NAME=conan
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS="--options args"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/init/vars.sh
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
export DISPLAY=:0
export WINEARCH=win64
export WINEPREFIX=/home/steam/.wine64
xvfb-run --auto-servernu m--server-args='-screen 0 640x480x24:32' wine /home/steam/exiles/common/Conan/ConanSandboxServer.exe -log -QueryPort=27055 &
;;
stop)
log_daemon_msg "Stopping $DESC" "$NAME"
wineserver -k
#wineserver -k9
;;
status)
[ $(pgrep -f wine | wc -l) -gt 0 ] && log_daemon_msg "is running" || log_daemon_msg "not running"
;;
restart)
stop
sleep 2
start
;;
*)
echo "Usage: $SCRIPTNAME stop" >&2
exit 3
;;
esac







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 1 '17 at 11:18









Michael D.Michael D.

1,737918




1,737918












  • Thanks for your help. One last question, how do I start this script in a new screen ? Sorry for all the "stupid" questions but the whole init thing is totally new for me. I was glad a few days ago to write a simple shell script but I cannot quite connect the dots yet :/

    – SaeSi
    Mar 1 '17 at 11:51












  • Screen as in Terminal? gnu.org/software/screen/manual/screen.html

    – Michael D.
    Mar 1 '17 at 13:13











  • This might work, but it's not an Upstart script, it's a SysVinit script.

    – Mark Stosberg
    Mar 1 '17 at 13:50











  • @MarkStosberg yes, check 3rd comment below question.

    – Michael D.
    Mar 1 '17 at 13:56

















  • Thanks for your help. One last question, how do I start this script in a new screen ? Sorry for all the "stupid" questions but the whole init thing is totally new for me. I was glad a few days ago to write a simple shell script but I cannot quite connect the dots yet :/

    – SaeSi
    Mar 1 '17 at 11:51












  • Screen as in Terminal? gnu.org/software/screen/manual/screen.html

    – Michael D.
    Mar 1 '17 at 13:13











  • This might work, but it's not an Upstart script, it's a SysVinit script.

    – Mark Stosberg
    Mar 1 '17 at 13:50











  • @MarkStosberg yes, check 3rd comment below question.

    – Michael D.
    Mar 1 '17 at 13:56
















Thanks for your help. One last question, how do I start this script in a new screen ? Sorry for all the "stupid" questions but the whole init thing is totally new for me. I was glad a few days ago to write a simple shell script but I cannot quite connect the dots yet :/

– SaeSi
Mar 1 '17 at 11:51






Thanks for your help. One last question, how do I start this script in a new screen ? Sorry for all the "stupid" questions but the whole init thing is totally new for me. I was glad a few days ago to write a simple shell script but I cannot quite connect the dots yet :/

– SaeSi
Mar 1 '17 at 11:51














Screen as in Terminal? gnu.org/software/screen/manual/screen.html

– Michael D.
Mar 1 '17 at 13:13





Screen as in Terminal? gnu.org/software/screen/manual/screen.html

– Michael D.
Mar 1 '17 at 13:13













This might work, but it's not an Upstart script, it's a SysVinit script.

– Mark Stosberg
Mar 1 '17 at 13:50





This might work, but it's not an Upstart script, it's a SysVinit script.

– Mark Stosberg
Mar 1 '17 at 13:50













@MarkStosberg yes, check 3rd comment below question.

– Michael D.
Mar 1 '17 at 13:56





@MarkStosberg yes, check 3rd comment below question.

– Michael D.
Mar 1 '17 at 13:56

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f348325%2fsystemd-to-upstart%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?