Skip to content

Commit

Permalink
webMAN MOD 1.47.45
Browse files Browse the repository at this point in the history
- Fixed script not disabling /dev_blind (use /dev_blind?0)
  • Loading branch information
aldostools committed Nov 22, 2023
1 parent 51bf6da commit 17ac584
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 1 deletion.
63 changes: 63 additions & 0 deletions _Projects_/ps3netsrv/bins/powerpc/init.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: ps3netsrv
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 2 3 5
# Default-Stop: 0 1 6
# Short-Description: Start PS3NetSrv.
# Description: Autostart PlayStation 3 Sharing Service.
### END INIT INFO
#

# Name of the demon (Название демона)
name="ps3netsrv"
# The path to the demon (Путь до демона)
dir="/opt/ps3netsrv"
# Launch options (Параметры для запуска)
arg="/mnt/Playstation 4500 192.168.*.*"
# Search PID (Поиск PID)
pid="$(pgrep ps3netsrv)"
# User (Пользователь)
user="ps3netsrv"

# Command start (Команда start)
start()
{
# от имени пользователя ps3netsrv запуск ps3netsrv
su $user -c "$dir/$name $arg"
echo "$name start"
}
# Command stop (Команда stop)
stop()
{
# убиваем ps3netsrv
su $user -c "kill $pid"
echo "$name stop"
}
# Restart command :: Stops, waits 1 second, starts the daemon again (Команда restart :: Останавливает, ждёт 1 сек, снова запускает демона)
restart()
{
stop
sleep 1
start
}
# Launch conditions (Условия запуска функций)
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
restart
;;
*)
# Output usage help (Вывод help по скрипту)
echo "Usage: {start|stop|restart}"
exit 1
;;
esac

exit 0
Binary file not shown.
7 changes: 7 additions & 0 deletions _Projects_/ps3netsrv/bins/powerpc/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Working version of ps3netsrv for Debian Jessie on PowerPC 44x (WesternDigital MyBook Live Duo NAS with CPU APM82181)

Compiled by RabinoVich
https://drive.google.com/file/d/1FJmOTYj1F2G85BO6W66QKilEU-78r7Nj

Simple /etc/init.d script to autostart ps3netsrv
https://drive.google.com/file/d/1-QwhHQ0_sHR65PyjHBOvIL958RdCI2A8
Binary file modified _Projects_/updater/pkgfiles/USRDIR/webftp_server_full.sprx
Binary file not shown.
Binary file modified _Projects_/updater/pkgfiles/USRDIR/webftp_server_lite.sprx
Binary file not shown.
Binary file modified _Projects_/updater/pkgfiles/USRDIR/webftp_server_noncobra.sprx
Binary file not shown.
Binary file not shown.
Binary file modified _Projects_/updater/update/dev_hdd0/plugins/webftp_server.sprx
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion include/feat/script.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static void parse_script(const char *script_file)
else if(_islike(line, "end")) {exec_mode = do_else = true;}
else if(exec_mode)
{
if(*line == '/') {if(IS_WEB_COMMAND(line)) handle_file_request(line);} else
if(*line == '/') {if(islike(line, "/dev_blind?0")) disable_dev_blind(); else if(IS_WEB_COMMAND(line)) handle_file_request(line);} else
if(_islike(line, "goto ")) {snprintf(label, 24, ":%s", line + 5); goto reload_script;} else
if(_islike(line, "del /")) {path += 4; check_path_tags(path); char *wildcard = strchr(path, '*'); if(wildcard) {*wildcard++ = NULL; scan(path, true, wildcard, SCAN_DELETE, NULL);} else del(path, RECURSIVE_DELETE);} else
if(_islike(line, "md /")) {path += 3; check_path_tags(path); mkdir_tree(path);} else
Expand Down

0 comments on commit 17ac584

Please sign in to comment.