This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:scripts:scriptstarter [2014/06/05 15:24] – created lunetikk | linux:scripts:scriptstarter [2018/12/20 17:40] (current) – Discussion status changed lunetikk | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Startscript ===== | ===== Startscript ===== | ||
- | <code sh scriptstarter.sh> | + | This script can be used to start and stop your script from any folder when it is placed in "/ |
+ | Start with: | ||
+ | <code>service scriptstarter.sh start</ | ||
+ | |||
+ | <code bash scriptstarter.sh> | ||
#!/bin/bash | #!/bin/bash | ||
Line 31: | Line 35: | ||
</ | </ | ||
+ | ===== Troubleshooting ===== | ||
+ | |||
+ | ==== Integer error ==== | ||
+ | |||
+ | Reason:\\ | ||
+ | Ubuntu says that it cant compare because your variable isnt integer. | ||
+ | \\ | ||
+ | \\ | ||
+ | Fix:\\ | ||
+ | Use == instead of -eq | ||
+ | |||
+ | \\ | ||
+ | \\ | ||
+ | ~~DISCUSSION: |