-
-
Save tstivers1990/c92b4ff5fc4cf859f9f3 to your computer and use it in GitHub Desktop.
Revisions
-
tstivers1990 revised this gist
Oct 21, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,8 @@ # Author: Ivan Derevianko aka druss <[email protected]> # Fixed for ASP.NET 5 beta 7 with DNVM/DNX by Michal A. Valasek - github.com/ridercz # Added support for dnx-watch added with ASP.NET 5 beta 8, improved configurability, # fixed 'nohup: ignoring input and redirecting stderr to stdout' message when starting - Anthony Stivers (github.com/tstivers1990) # Set path variable so that dnx-watch can find dnx -
tstivers1990 revised this gist
Oct 21, 2015 . 1 changed file with 17 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: <SERVICE_NAME> # Required-Start: $local_fs $network $named $time $syslog # Required-Stop: $local_fs $network $named $time $syslog # Default-Start: 2 3 4 5 @@ -10,10 +10,21 @@ # Author: Ivan Derevianko aka druss <[email protected]> # Fixed for ASP.NET 5 beta 7 with DNVM/DNX by Michal A. Valasek - github.com/ridercz # Added support for dnx-watch added with ASP.NET 5 beta 8 by Anthony Stivers - github.com/tstivers1990 # Set path variable so that dnx-watch can find dnx WWW_USER=<WWW_USER> # We can use either dnx or dnx-watch here DNXRUNTIME=dnx-watch DNXFRAMEWORK=mono DNXVERSION=1.0.0-beta8 DNXCOMMAND=kestrel APPROOT=/home/$WWW_USER/<APPROOT> DNXPATHS=/home/$WWW_USER/.dnx/runtimes/dnx-$DNXFRAMEWORK.$DNXVERSION/bin:/home/$WWW_USER/.dnx/bin PIDFILE=$APPROOT/kestrel.pid LOGFILE=$APPROOT/kestrel.log @@ -28,7 +39,7 @@ start() { return 1 fi echo 'Starting service...' >&2 su -c "export PATH=$DNXPATHS:\${PATH} && start-stop-daemon -SbmCv -x /usr/bin/nohup -p \"$PIDFILE\" -d \"$APPROOT\" -- \"$DNXRUNTIME\" $DNXCOMMAND > \"$LOGFILE\" 2>&1" $WWW_USER echo 'Service started' >&2 } @@ -58,4 +69,4 @@ case "$1" in echo "Usage: $0 {start|stop|restart}" esac export runlevel=$TMP_SAVE_runlevel_VAR -
ridercz revised this gist
Oct 9, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,10 +9,10 @@ ### END INIT INFO # Author: Ivan Derevianko aka druss <[email protected]> # Fixed for ASP.NET 5 beta 7 with DNVM/DNX by Michal A. Valasek - github.com/ridercz WWW_USER=<USERNAME> DNXRUNTIME=<PATH_TO_RUNTIME> #/home/$WWW_USER/.dnx/runtimes/dnx-mono.1.0.0-beta7/bin/dnx APPROOT=<PATH_TO_APPLICATION> #/home/$WWW_USER/vNext/mvc/HelloMvc PIDFILE=$APPROOT/kestrel.pid @@ -28,7 +28,7 @@ start() { return 1 fi echo 'Starting service...' >&2 su -c "start-stop-daemon -SbmCv -x /usr/bin/nohup -p \"$PIDFILE\" -d \"$APPROOT\" -- \"$DNXRUNTIME\" kestrel > \"$LOGFILE\"" $WWW_USER echo 'Service started' >&2 } -
ridercz revised this gist
Jul 13, 2015 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,9 +9,10 @@ ### END INIT INFO # Author: Ivan Derevianko aka druss <[email protected]> # Fixed for ASP.NET 5 beta 5 with DNVM/DNX by Michal A. Valasek - github.com/ridercz WWW_USER=<USERNAME> DNXRUNTIME=<PATH_TO_RUNTIME> #/home/$WWW_USER/.dnx/runtimes/dnx-mono.1.0.0-beta5/bin/dnx APPROOT=<PATH_TO_APPLICATION> #/home/$WWW_USER/vNext/mvc/HelloMvc PIDFILE=$APPROOT/kestrel.pid @@ -27,7 +28,7 @@ start() { return 1 fi echo 'Starting service...' >&2 su -c "start-stop-daemon -SbmCv -x /usr/bin/nohup -p \"$PIDFILE\" -d \"$APPROOT\" -- \"$DNXRUNTIME\" . kestrel > \"$LOGFILE\"" $WWW_USER echo 'Service started' >&2 } -
drussilla revised this gist
Jun 12, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,7 @@ start() { echo 'Service already running' >&2 return 1 fi echo 'Starting service...' >&2 su -c "start-stop-daemon -SbmCv -x /usr/bin/nohup -p \"$PIDFILE\" -d \"$APPROOT\" -- \"$DNXRUNTIME\" kestrel > \"$LOGFILE\"" $WWW_USER echo 'Service started' >&2 } @@ -36,7 +36,7 @@ stop() { echo 'Service not running' >&2 return 1 fi echo 'Stopping service...' >&2 start-stop-daemon -K -p "$PIDFILE" rm -f "$PIDFILE" echo 'Service stopped' >&2 -
drussilla revised this gist
Jun 12, 2015 . 1 changed file with 11 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,29 +2,32 @@ ### BEGIN INIT INFO # Provides: <SCRIPT_NAME> # Required-Start: $local_fs $network $named $time $syslog # Required-Stop: $local_fs $network $named $time $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Script to run asp.net 5 application in background ### END INIT INFO # Author: Ivan Derevianko aka druss <[email protected]> WWW_USER=<USERNAME> DNXRUNTIME=<PATH_TO_RUNTIME> #/home/$WWW_USER/.k/runtimes/kre-mono.1.0.0-beta3/bin/k APPROOT=<PATH_TO_APPLICATION> #/home/$WWW_USER/vNext/mvc/HelloMvc PIDFILE=$APPROOT/kestrel.pid LOGFILE=$APPROOT/kestrel.log # fix issue with DNX exception in case of two env vars with the same name but different case TMP_SAVE_runlevel_VAR=$runlevel unset runlevel start() { if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE); then echo 'Service already running' >&2 return 1 fi echo 'Starting service…' >&2 su -c "start-stop-daemon -SbmCv -x /usr/bin/nohup -p \"$PIDFILE\" -d \"$APPROOT\" -- \"$DNXRUNTIME\" kestrel > \"$LOGFILE\"" $WWW_USER echo 'Service started' >&2 } @@ -52,4 +55,6 @@ case "$1" in ;; *) echo "Usage: $0 {start|stop|restart}" esac export runlevel=$TMP_SAVE_runlevel_VAR -
drussilla revised this gist
Jun 12, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ ### BEGIN INIT INFO # Provides: <SCRIPT_NAME> # Required-Start: $local_fs $network $named $time $syslog # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Script to run asp.net 5 application in background -
drussilla revised this gist
Jun 12, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ # Author: Ivan Derevianko aka druss <[email protected]> USER=<USERNAME> #kestrel DNXRUNTIME=<PATH_TO_RUNTIME> #/home/$USER/.k/runtimes/kre-mono.1.0.0-beta3/bin/k APPROOT=<PATH_TO_APPLICATION> #/home/$USER/mvc/HelloMvc -
drussilla created this gist
Jun 12, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,55 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: <SCRIPT_NAME> # Required-Start: $local_fs $network $named $time $syslog # Required-Stop: $local_fs $network $named $time $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Script to run asp.net 5 application in background ### END INIT INFO # Author: Ivan Derevianko aka druss <[email protected]> USER=<USERNAME> DNXRUNTIME=<PATH_TO_RUNTIME> #/home/$USER/.k/runtimes/kre-mono.1.0.0-beta3/bin/k APPROOT=<PATH_TO_APPLICATION> #/home/$USER/mvc/HelloMvc PIDFILE=$APPROOT/kestrel.pid LOGFILE=$APPROOT/kestrel.log start() { if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE); then echo 'Service already running' >&2 return 1 fi echo 'Starting service…' >&2 su -c "start-stop-daemon -SbmCv -x /usr/bin/nohup -p \"$PIDFILE\" -d \"$APPROOT\" -- \"$DNXRUNTIME\" kestrel > \"$LOGFILE\"" $USER echo 'Service started' >&2 } stop() { if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then echo 'Service not running' >&2 return 1 fi echo 'Stopping service…' >&2 start-stop-daemon -K -p "$PIDFILE" rm -f "$PIDFILE" echo 'Service stopped' >&2 } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo "Usage: $0 {start|stop|restart}" esac