Advertisement
Guest User

Untitled

a guest
Aug 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. #!/bin/sh
  2. #/etc/init.d/wuala
  3.  
  4. # Variables
  5. WUALA_USER="your_username"
  6. WUALA_PASS="your_password"
  7. WUALA_PATH="/usr/local/wuala"
  8.  
  9. # Define LSB log_* functions.
  10. . /lib/lsb/init-functions
  11.  
  12. # Lock
  13. touch /var/lock/wuala
  14.  
  15. case "$1" in
  16. start)
  17. log_daemon_msg "Starting Wuala Agent..."
  18. su - root -c "$WUALA_PATH/wuala -basepath $WUALA_PATH login $WUALA_USER $WUALA_PASS &" &
  19. sleep 5
  20. log_end_msg 0
  21. ;;
  22. stop)
  23. log_daemon_msg "Stopping Wuala Agent..."
  24. su - root -c "$WUALA_PATH/wuala -basepath $WUALA_PATH logout &" &
  25. log_end_msg 0
  26. ;;
  27. *)
  28. echo "Usage: /etc/init.d/wuala {start|stop}"
  29. exit 1
  30. ;;
  31. esac
  32.  
  33. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement