File: RUNNING_SCRIPT

package info (click to toggle)
didiwiki 3.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,912 kB
  • sloc: ansic: 5,985; sh: 1,532; makefile: 27
file content (23 lines) | stat: -rw-r--r-- 606 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Experimental feature

It is possible to run a script on the server, to do this :

- The script must be located in the folder /scripts/ and this folder is inside .ciwiki.
- ciwiki must be launched with the argument --exec.
- The client must be logged in.
- The script is called from a client computer, like this : 

  inet_adress/.Execute?Script=myscript.sh

myscript.sh is the script to run in the server side. It must be executable.

Example of script displaying the uptime and the memory available:

#!/bin/sh
uptime
echo " "
free
echo " "
echo "------------------------------------------------------"