The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syscmd sysspawn
Author Message
xotapt
Apprentice
*

Posts: 1
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Mar 2013
Reputation: 0



Post: #1
Exclamation Syscmd sysspawn
Hi all,

going on trought the changelog/revisions, i ended up with exactly what i needed

the commands Syscmd and Sysspawn, however there seems to be no information/example of them actualy working, i have tried several ways to make them execute an external app, but no luck so far.

Can someone post an example or some info on how to achieve that?

th
03-20-2013 07:29 AM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #2
RE: Syscmd sysspawn
This is an old script I had made to create a backup of the server.

PHP Code:
[DEFNAME BACKUPDEF]

SERVUID 0166e5                //UID used to perform certain server funtions (use a plevel 7 account's char uid)
WINRAR  c:\progra~1\winrar\winrar.exe    //Full path to the winrar program (must be DOS format... no space)
WINPASS password            //password to encrypt the ziped file (remove the -hp switch to disable password encryption)
WINNAME c:\sphere\Backup\name        //Full path and name of the wanted ziped file (name will take "name-date" format)
WINLIST c:\sphere\backup.lst        //Full path to the file containing the list of files to zip)


[FUNCTION rtime.day]
return <
strsub 8 2 <serv.rtime>>


[FUNCTION 
f_onserver_save_ok]

LCOAL.OLDOBJ <OBJ.UID>
OBJ <DEF0.SERVUID>
OBJ.MAKEBACKUP
OBJ 
<LCOAL.OLDOBJ>


[FUNCTION 
MAKEBACKUP]
//ARGN = force backup

IF !(<rtime.day> == <VAR0.lastbackup>) || (<ARGN>)
LOCAL.BACKUP <sysspawn <DEF0.WINRAR---m5 --hp<DEF0.WINPASS> -ibck -ag-YY-MM-DD <DEF0.WINNAME> @<DEF0.WINLIST>>
VAR.
lastbackup = <rtime.day>
SERV.LOG Backup complete
ENDIF 

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
03-20-2013 07:53 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)